tesseract v5.3.3.20231005
cpp.ast.Node Class Reference
Inheritance diagram for cpp.ast.Node:
cpp.ast.Define cpp.ast.Expr cpp.ast.Goto cpp.ast.Include cpp.ast.Parameter cpp.ast.Using cpp.ast._GenericDeclaration cpp.ast.Delete cpp.ast.Friend cpp.ast.Return cpp.ast.Class cpp.ast.Function cpp.ast.Type cpp.ast.Typedef cpp.ast.VariableDeclaration cpp.ast._NestedType

Public Member Functions

def __init__ (self, start, end)
 
def IsDeclaration (self)
 
def IsDefinition (self)
 
def IsExportable (self)
 
def Requires (self, node)
 
def XXX__str__ (self)
 
def __repr__ (self)
 

Public Attributes

 start
 
 end
 

Detailed Description

Base AST node.

Definition at line 107 of file ast.py.

Constructor & Destructor Documentation

◆ __init__()

def cpp.ast.Node.__init__ (   self,
  start,
  end 
)

Member Function Documentation

◆ __repr__()

def cpp.ast.Node.__repr__ (   self)

Definition at line 138 of file ast.py.

138 def __repr__(self):
139 return str(self)
140
141

◆ IsDeclaration()

def cpp.ast.Node.IsDeclaration (   self)
Returns bool if this node is a declaration.

Reimplemented in cpp.ast.Class, cpp.ast.Function, and cpp.ast.Type.

Definition at line 114 of file ast.py.

114 def IsDeclaration(self):
115 """Returns bool if this node is a declaration."""
116 return False
117

◆ IsDefinition()

def cpp.ast.Node.IsDefinition (   self)
Returns bool if this node is a definition.

Reimplemented in cpp.ast.Typedef, cpp.ast._NestedType, cpp.ast.Class, cpp.ast.Function, and cpp.ast.Type.

Definition at line 118 of file ast.py.

118 def IsDefinition(self):
119 """Returns bool if this node is a definition."""
120 return False
121

◆ IsExportable()

def cpp.ast.Node.IsExportable (   self)
Returns bool if this node exportable from a header file.

Reimplemented in cpp.ast.Typedef, cpp.ast._NestedType, cpp.ast.Class, cpp.ast.Function, and cpp.ast.Type.

Definition at line 122 of file ast.py.

122 def IsExportable(self):
123 """Returns bool if this node exportable from a header file."""
124 return False
125

◆ Requires()

def cpp.ast.Node.Requires (   self,
  node 
)
Does this AST node require the definition of the node passed in?

Reimplemented in cpp.ast.Expr, cpp.ast.Parameter, cpp.ast.VariableDeclaration, cpp.ast.Typedef, cpp.ast.Class, and cpp.ast.Function.

Definition at line 126 of file ast.py.

126 def Requires(self, node):
127 """Does this AST node require the definition of the node passed in?"""
128 return False
129

◆ XXX__str__()

def cpp.ast.Node.XXX__str__ (   self)

Definition at line 130 of file ast.py.

130 def XXX__str__(self):
131 return self._StringHelper(self.__class__.__name__, '')
132

Member Data Documentation

◆ end

cpp.ast.Node.end

Definition at line 112 of file ast.py.

◆ start

cpp.ast.Node.start

Definition at line 111 of file ast.py.


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