43 std::shared_ptr<ASTNode>
getRoot()
const;
58 std::shared_ptr<ASTNode> root;
Base class for AST visitors.
Definition: ASTVisitor.h:23
The client-facing iterator interface.
Definition: Iterator.h:15
A convenient interface to the AST nodes.
Definition: SyntaxTree.h:16
void accept(ASTVisitor *visitor)
Apply the visitor to the root of the tree.
Definition: SyntaxTree.cpp:38
SyntaxTree(std::shared_ptr< ASTNode > node)
Definition: SyntaxTree.cpp:5
Iterator begin(std::string const &order)
Definition: SyntaxTree.cpp:11
std::shared_ptr< ASTNode > getRoot() const
Return the root of the tree.
Definition: SyntaxTree.cpp:42
SyntaxTree & operator=(SyntaxTree const &tree)
Definition: SyntaxTree.cpp:31
Iterator end(std::string const &order)
Construct an iterator pointing at the end of the tree.
Definition: SyntaxTree.cpp:17
Iterator begin(std::string const &order) const
SyntaxTree(SyntaxTree const &tree)
std::vector< SyntaxTree > getSubtrees()
Return the children of the root as collection of SyntaxTrees.
Definition: SyntaxTree.cpp:22