FreeTensor
Loading...
Searching...
No Matches
Public Member Functions | List of all members
freetensor::ASTNode Class Referenceabstract

#include <ast.h>

Inheritance diagram for freetensor::ASTNode:
Inheritance graph
[legend]
Collaboration diagram for freetensor::ASTNode:
Collaboration graph
[legend]

Public Member Functions

virtual ~ASTNode ()
 
virtual ASTNodeType nodeType () const =0
 
bool isAST () const override
 
virtual bool isFunc () const
 
virtual bool isStmt () const
 
virtual bool isExpr () const
 
Ref< ASTNodeparentAST () const
 
std::source_location debugBlame () const
 
void setDebugBlame (std::source_location loc)
 
 DEFINE_NODE_ACCESS (AST)
 
- Public Member Functions inherited from freetensor::ASTPart
virtual ~ASTPart ()
 
 ASTPart (ASTPart &&other)
 
 ASTPart (const ASTPart &other)
 
ASTPartoperator= (ASTPart &&)
 
ASTPartoperator= (const ASTPart &)
 
bool trySetParent (const Ref< ASTPart > &parent)
 
void resetParent ()
 
Ref< ASTPartparent () const
 
bool isSubTree () const
 
int depth () const
 
virtual void modifiedHook ()
 
size_t hash ()
 
virtual bool isAST () const
 
- Public Member Functions inherited from freetensor::EnableSelf< ASTPart >
Ref< ASTPartself () const
 

Additional Inherited Members

- Public Types inherited from freetensor::EnableSelf< ASTPart >
typedef ASTPart Self
 
- Protected Member Functions inherited from freetensor::ASTPart
void lock ()
 
void unlock ()
 
virtual void compHash ()=0
 
void resetHash ()
 
- Protected Attributes inherited from freetensor::ASTPart
size_t hash_ = ~0ull
 
std::atomic_flag lock_ = ATOMIC_FLAG_INIT
 

Detailed Description

Base class of all nodes in an AST

ASTNode is the minimal unit that can be traversed by a Visitor, or traversed and modified by a Mutator. An ASTNode is a derived class of ASTPart, and a derived node of ASTNode may contain other ASTParts

Constructor & Destructor Documentation

◆ ~ASTNode()

virtual freetensor::ASTNode::~ASTNode ( )
inlinevirtual

Member Function Documentation

◆ debugBlame()

std::source_location freetensor::ASTNode::debugBlame ( ) const
inline

◆ DEFINE_NODE_ACCESS()

freetensor::ASTNode::DEFINE_NODE_ACCESS ( AST  )

◆ isAST()

bool freetensor::ASTNode::isAST ( ) const
inlineoverridevirtual

Reimplemented from freetensor::ASTPart.

◆ isExpr()

virtual bool freetensor::ASTNode::isExpr ( ) const
inlinevirtual

Reimplemented in freetensor::ExprNode.

◆ isFunc()

virtual bool freetensor::ASTNode::isFunc ( ) const
inlinevirtual

Reimplemented in freetensor::FuncNode.

◆ isStmt()

virtual bool freetensor::ASTNode::isStmt ( ) const
inlinevirtual

Reimplemented in freetensor::StmtNode.

◆ nodeType()

virtual ASTNodeType freetensor::ASTNode::nodeType ( ) const
pure virtual

◆ parentAST()

AST freetensor::ASTNode::parentAST ( ) const

◆ setDebugBlame()

void freetensor::ASTNode::setDebugBlame ( std::source_location  loc)
inline

The documentation for this class was generated from the following files: