|
MXVM 1.8.1
Virtual Machine, Compiler, and Pascal Frontend
|
AST node for constant declarations (const id = value). More...
#include <ast.hpp>

Classes | |
| struct | ConstAssignment |
| A single constant name = value pair. More... | |
Public Member Functions | |
| ConstDeclNode (std::vector< std::unique_ptr< ConstAssignment > > assigns) | |
| void | accept (ASTVisitor &visitor) override |
| Accept an ASTVisitor (double-dispatch). | |
| std::string | toString () const override |
| Return a human-readable description of this node. | |
| Public Member Functions inherited from pascal::ASTNode | |
| virtual | ~ASTNode ()=default |
| virtual void | print (std::ostream &out, int indent=0) const |
| Pretty-print this node to a stream with indentation. | |
| void | setLineNumber (int line) |
| Set the originating source line number. | |
| int | getLineNumber () const |
| Get the originating source line number. | |
Public Attributes | |
| std::vector< std::unique_ptr< ConstAssignment > > | assignments |
| list of constant assignments | |
|
inline |
Definition at line 186 of file ast.hpp.
References assignments.
|
overridevirtual |
Accept an ASTVisitor (double-dispatch).
Implements pascal::ASTNode.
Definition at line 285 of file ast.cpp.
References pascal::ASTVisitor::visit().
|
overridevirtual |
Return a human-readable description of this node.
Implements pascal::ASTNode.
| std::vector<std::unique_ptr<ConstAssignment> > pascal::ConstDeclNode::assignments |
list of constant assignments
Definition at line 185 of file ast.hpp.
Referenced by ConstDeclNode(), pascal::CodeGenVisitor::registerImportedConst(), and pascal::CodeGenVisitor::visit().