AST in an inconsistent form during construction.
More...
#include <ast.h>
AST in an inconsistent form during construction.
Represents AST under construction(inconsistent state).
- Attention
- Clients should use rather xreate::AST unless client's code explicitly works with Syntax Tree during construction.
Typically an instance is created by xreate::XreateManager only and filled out by the parser
- See also
- xreate::XreateManager::prepare(std::string&&)
◆ add() [1/3]
Adds new function to AST.
- Parameters
-
◆ add() [2/3]
void add |
( |
MetaRuleAbstract * |
r | ) |
|
Adds new declarative rule to AST.
- Parameters
-
◆ add() [3/3]
Add new type to AST.
- Parameters
-
t | Type definition |
alias | Typer name |
◆ addDFAData()
Stores DFA scheme for later use by DFA Pass.
Treats expression as a DFA scheme and feeds to the DFA Pass later
- Parameters
-
- See also
- xreate::DFAPass
◆ addInterfaceData()
void addInterfaceData |
( |
const ASTInterface & |
interface, |
|
|
Expression && |
data |
|
) |
| |
Generalized function to store particular data for later use by particular pass.
- Parameters
-
interface | Particular Interface |
data | Particular data |
◆ begin()
ManagedPtr<Target> begin |
( |
| ) |
|
- Returns
- First element in Functions/Scopes/Rules list depending on template parameter
- Template Parameters
-
◆ finalize()
Performs all necessary steps after AST is built.
Performs all finalization steps and moves AST into consistent state represented by xreate::AST
- See also
- xreate::AST
- Returns
- AST in consistent state
◆ findFunction()
ManagedPtr< Function > findFunction |
( |
const std::string & |
name | ) |
|
Looks for function with given name.
- Parameters
-
- Note
- Requires that only one function exists under given name
- Returns
- Found function
◆ getFunctionSpecializations()
std::list< ManagedFnPtr > getFunctionSpecializations |
( |
const std::string & |
fnName | ) |
const |
Returns all specializations of a function with a given name.
- Parameters
-
- Returns
- list of found function specializations
◆ postponeIdentifier()
Postpones unrecognized identifier for future second round of recognition.
- Parameters
-
scope | Code block identifier is encountered |
id | Identifier |
The documentation for this class was generated from the following files:
- cpp/src/ast.h
- cpp/src/ast.cpp