1 #ifndef INC_BaseAST_hpp__
2 #define INC_BaseAST_hpp__
16 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
37 virtual const char* typeName(
void )
const = 0;
40 virtual RefAST clone(
void )
const = 0;
43 virtual bool equals(
RefAST t)
const;
48 virtual bool equalsList(
RefAST t)
const;
52 virtual bool equalsListPartial(
RefAST t)
const;
57 virtual bool equalsTree(
RefAST t)
const;
62 virtual bool equalsTreePartial(
RefAST t)
const;
97 virtual size_t getNumberOfChildren()
const;
130 down =
static_cast<BaseAST*
>(
static_cast<AST*
>(c));
136 right =
static_cast<BaseAST*
>(
static_cast<AST*
>(n));
149 #ifdef ANTLR_SUPPORT_XML
186 return ((getType() == t->getType()) && (getText() == t->getText()));
189 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
193 #endif //INC_BaseAST_hpp__
virtual void setText(const std::string &txt)
Set the token text for this node.
Definition: BaseAST.hpp:140
virtual RefAST getNextSibling() const
Get the next sibling in line after this one.
Definition: BaseAST.hpp:105
BaseAST()
Definition: BaseAST.hpp:25
Definition: BaseAST.hpp:23
#define ANTLR_API
Definition: config.hpp:22
virtual void setNextSibling(RefAST n)
Set the next sibling after this one.
Definition: BaseAST.hpp:134
virtual RefAST getFirstChild() const
Get the first child of this node; null if no children.
Definition: BaseAST.hpp:100
virtual void removeChildren()
Remove all children.
Definition: BaseAST.hpp:122
RefAST nullAST
Definition: BaseAST.cpp:271
virtual int getType() const
Get the token type for this node.
Definition: BaseAST.hpp:116
ASTRefCount< AST > RefAST
Definition: ASTRefCount.hpp:92
RefBaseAST right
Definition: BaseAST.hpp:173
ASTRefCount< BaseAST > RefBaseAST
Definition: BaseAST.hpp:20
BaseAST(const BaseAST &other)
Definition: BaseAST.hpp:28
virtual void setFirstChild(RefAST c)
Set the first child of a node.
Definition: BaseAST.hpp:128
#define ANTLR_USE_NAMESPACE(_x_)
Definition: config.hpp:18
virtual void setType(int type)
Set the token type for this node.
Definition: BaseAST.hpp:145
virtual ~BaseAST()
Definition: BaseAST.hpp:32