Base class of all AST nodes for Rosebud.
Definition at line 62 of file Ast.h.
#include <Rosebud/Ast.h>
|
template<class T > |
std::shared_ptr< T > | findAncestor () |
|
UserBasePtr | pointer () |
| Returns a shared pointer to this vertex.
|
|
std::shared_ptr< T > | isa () |
| Tests whether this object is a certain type.
|
|
auto | traverseReverse (const Visitor &visitor) |
| Traverse in reverse direction from children to parents.
|
|
auto | traverse (const Visitor &visitor) |
| Traverse in forward direction from parents to children.
|
|
auto | traversePre (const Visitor &visitor) |
| Pre-order forward traversal.
|
|
auto | traversePost (const Visitor &visitor) |
| Post-order forward traversal.
|
|
std::shared_ptr< T > | findFirstAncestor () |
| Traversal that finds the closest ancestor of type T or derived from T.
|
|
std::shared_ptr< T > | findLastAncestor () |
| Traversal that finds the farthest ancestor of type T or derived from T.
|
|
std::vector< std::shared_ptr< T > > | findDescendants () |
| Traversal that finds all the descendants of a particular type.
|
|
UserBasePtr | child (size_t i) const |
| Returns the pointer for a child.
|
|
size_t | nChildren () const |
| Returns the number of children.
|
|
◆ Ptr
using Rosebud::Ast::Node::Ptr = NodePtr |
Definition at line 66 of file Ast.h.
◆ ~Node()
virtual Rosebud::Ast::Node::~Node |
( |
| ) |
|
|
inlinevirtual |
Definition at line 64 of file Ast.h.
◆ findAncestor()
template<class T >
std::shared_ptr< T > Rosebud::Ast::Node::findAncestor |
( |
| ) |
|
|
inline |
Definition at line 69 of file Ast.h.
The documentation for this class was generated from the following file: