|
MXVM 1.8.1
Virtual Machine, Compiler, and Pascal Frontend
|
AST node for a label definition (label: statement). More...
#include <ast.hpp>

Public Member Functions | |
| LabelStmtNode (const std::string &lbl, std::unique_ptr< ASTNode > stmt) | |
| 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::string | label |
| the label (numeric string) | |
| std::unique_ptr< ASTNode > | statement |
| labeled statement | |
|
inline |
|
overridevirtual |
Accept an ASTVisitor (double-dispatch).
Implements pascal::ASTNode.
Definition at line 450 of file ast.cpp.
References pascal::ASTVisitor::visit().
|
inlineoverridevirtual |
Return a human-readable description of this node.
Implements pascal::ASTNode.
Definition at line 701 of file ast.hpp.
References label.
| std::string pascal::LabelStmtNode::label |
the label (numeric string)
Definition at line 694 of file ast.hpp.
Referenced by LabelStmtNode(), toString(), and pascal::CodeGenVisitor::visit().
| std::unique_ptr<ASTNode> pascal::LabelStmtNode::statement |
labeled statement
Definition at line 695 of file ast.hpp.
Referenced by LabelStmtNode(), and pascal::CodeGenVisitor::visit().