|
MXVM 1.8.1
Virtual Machine, Compiler, and Pascal Frontend
|
AST node for an assignment statement (variable := expression). More...
#include <ast.hpp>

Public Member Functions | |
| AssignmentNode (std::unique_ptr< ASTNode > var, std::unique_ptr< ASTNode > expr) | |
| 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::unique_ptr< ASTNode > | variable |
| target of the assignment | |
| std::unique_ptr< ASTNode > | expression |
| value expression | |
AST node for an assignment statement (variable := expression).
|
inline |
Definition at line 254 of file ast.hpp.
References expression, and variable.
|
overridevirtual |
Accept an ASTVisitor (double-dispatch).
Implements pascal::ASTNode.
Definition at line 117 of file ast.cpp.
References pascal::ASTVisitor::visit().
|
overridevirtual |
Return a human-readable description of this node.
Implements pascal::ASTNode.
| std::unique_ptr<ASTNode> pascal::AssignmentNode::expression |
value expression
Definition at line 252 of file ast.hpp.
Referenced by AssignmentNode(), and pascal::CodeGenVisitor::visit().
| std::unique_ptr<ASTNode> pascal::AssignmentNode::variable |
target of the assignment
Definition at line 251 of file ast.hpp.
Referenced by AssignmentNode(), and pascal::CodeGenVisitor::visit().