|
MXVM 1.8.1
Virtual Machine, Compiler, and Pascal Frontend
|
AST node for accessing a record field (record.field). More...
#include <ast.hpp>

Public Member Functions | |
| FieldAccessNode (std::unique_ptr< ASTNode > recordExpr, const std::string &fieldName) | |
| 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 > | recordExpr |
| expression yielding a record | |
| std::string | fieldName |
| name of the accessed field | |
| pascal::FieldAccessNode::FieldAccessNode | ( | std::unique_ptr< ASTNode > | recordExpr, |
| const std::string & | fieldName ) |
Definition at line 364 of file ast.cpp.
References fieldName, and recordExpr.
|
overridevirtual |
Accept an ASTVisitor (double-dispatch).
Implements pascal::ASTNode.
Definition at line 367 of file ast.cpp.
References pascal::ASTVisitor::visit().
|
overridevirtual |
Return a human-readable description of this node.
Implements pascal::ASTNode.
Definition at line 369 of file ast.cpp.
References fieldName.
| std::string pascal::FieldAccessNode::fieldName |
name of the accessed field
Definition at line 729 of file ast.hpp.
Referenced by FieldAccessNode(), toString(), and pascal::CodeGenVisitor::visit().
| std::unique_ptr<ASTNode> pascal::FieldAccessNode::recordExpr |
expression yielding a record
Definition at line 728 of file ast.hpp.
Referenced by FieldAccessNode(), and pascal::CodeGenVisitor::visit().