MathParser\Interpreting\Visitors Namespace Reference

Interfaces required to implement the visitor design pattern. More...

Classes

interface  Visitable
 Visitable interface,. More...
 
interface  Visitor
 Visitor interface. More...
 

Detailed Description

Interfaces required to implement the visitor design pattern.

Two interfaces are required:

  • Visitable should be implemented by classes to be visited, i.e. subclasses of Node. This interface consists of a single function accept(), called to visit the AST.
  • Visitor should be implemented by AST transformers, and consists of one function for each subclass of Node, i.e. visitXXXNode()