#include <BaseAST.hpp>
BaseAST::BaseAST |
( |
const BaseAST & |
other | ) |
|
|
inline |
virtual BaseAST::~BaseAST |
( |
| ) |
|
|
inlinevirtual |
virtual void BaseAST::addChild |
( |
RefAST |
c | ) |
|
|
inlinevirtual |
Add a node to the end of the child list for this node.
Implements AST.
virtual RefAST BaseAST::clone |
( |
void |
| ) |
const |
|
pure virtual |
void BaseAST::doWorkForFindAll |
( |
std::vector< RefAST > & |
v, |
|
|
RefAST |
target, |
|
|
bool |
partialMatch |
|
) |
| |
|
private |
bool BaseAST::equals |
( |
RefAST |
t | ) |
const |
|
inlinevirtual |
Is node t equal to this in terms of token type and text?
Implements AST.
bool BaseAST::equalsList |
( |
RefAST |
t | ) |
const |
|
virtual |
Is t an exact structural and equals() match of this tree. The 'this' reference is considered the start of a sibling list.
Implements AST.
bool BaseAST::equalsListPartial |
( |
RefAST |
sub | ) |
const |
|
virtual |
Is 't' a subtree of this list? The siblings of the root are NOT ignored.
Is 'sub' a subtree of this list? The siblings of the root are NOT ignored.
Implements AST.
bool BaseAST::equalsTree |
( |
RefAST |
t | ) |
const |
|
virtual |
Is tree rooted at 'this' equal to 't'? The siblings of 'this' are ignored.
Implements AST.
bool BaseAST::equalsTreePartial |
( |
RefAST |
sub | ) |
const |
|
virtual |
Is 't' a subtree of the tree rooted at 'this'? The siblings of 'this' are ignored.
Is 'sub' a subtree of the tree rooted at 'this'? The siblings of 'this' are ignored.
Implements AST.
Walk the tree looking for all exact subtree matches. Return an ASTEnumerator that lets the caller walk the list of subtree roots found herein.
Implements AST.
std::vector< RefAST > BaseAST::findAllPartial |
( |
RefAST |
target | ) |
|
|
virtual |
Walk the tree looking for all subtrees. Return an ASTEnumerator that lets the caller walk the list of subtree roots found herein.
Implements AST.
virtual RefAST BaseAST::getFirstChild |
( |
| ) |
const |
|
inlinevirtual |
Get the first child of this node; null if no children.
Implements AST.
virtual RefAST BaseAST::getNextSibling |
( |
| ) |
const |
|
inlinevirtual |
Get the next sibling in line after this one.
Implements AST.
size_t BaseAST::getNumberOfChildren |
( |
| ) |
const |
|
virtual |
Get the number of child nodes of this node (shallow e.g. not of the whole tree it spans).
Implements AST.
virtual std ::string BaseAST::getText |
( |
| ) |
const |
|
inlinevirtual |
Get the token text for this node.
Implements AST.
Reimplemented in CommonAST.
virtual int BaseAST::getType |
( |
| ) |
const |
|
inlinevirtual |
Get the token type for this node.
Implements AST.
Reimplemented in CommonAST.
virtual void BaseAST::removeChildren |
( |
| ) |
|
|
inlinevirtual |
virtual void BaseAST::setFirstChild |
( |
RefAST |
c | ) |
|
|
inlinevirtual |
Set the first child of a node.
Implements AST.
virtual void BaseAST::setNextSibling |
( |
RefAST |
n | ) |
|
|
inlinevirtual |
Set the next sibling after this one.
Implements AST.
virtual void BaseAST::setText |
( |
const std::string & |
txt | ) |
|
|
inlinevirtual |
Set the token text for this node.
Implements AST.
Reimplemented in CommonAST.
virtual void BaseAST::setType |
( |
int |
type | ) |
|
|
inlinevirtual |
Set the token type for this node.
Implements AST.
Reimplemented in CommonAST.
virtual std ::string BaseAST::toString |
( |
| ) |
const |
|
inlinevirtual |
Return string representation for the AST.
Implements AST.
std::string BaseAST::toStringList |
( |
| ) |
const |
|
virtual |
Print out a child sibling tree in LISP notation.
Implements AST.
std::string BaseAST::toStringTree |
( |
| ) |
const |
|
virtual |
virtual const char* BaseAST::typeName |
( |
void |
| ) |
const |
|
pure virtual |
The documentation for this class was generated from the following files: