|
MXVM 1.8.1
Virtual Machine, Compiler, and Pascal Frontend
|
AST node for an enumerated type declaration (type Color = (Red, Green, Blue)). More...
#include <ast.hpp>

Public Member Functions | |
| EnumTypeDeclNode (const std::string &name, std::vector< std::string > vals) | |
| 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 | typeName |
| the enum type name | |
| std::vector< std::string > | values |
| ordered list of enum value identifiers | |
AST node for an enumerated type declaration (type Color = (Red, Green, Blue)).
|
inline |
|
overridevirtual |
Accept an ASTVisitor (double-dispatch).
Implements pascal::ASTNode.
Definition at line 462 of file ast.cpp.
References pascal::ASTVisitor::visit().
|
inlineoverridevirtual |
Return a human-readable description of this node.
Implements pascal::ASTNode.
Definition at line 636 of file ast.hpp.
References typeName.
| std::string pascal::EnumTypeDeclNode::typeName |
the enum type name
Definition at line 629 of file ast.hpp.
Referenced by EnumTypeDeclNode(), toString(), and pascal::CodeGenVisitor::visit().
| std::vector<std::string> pascal::EnumTypeDeclNode::values |
ordered list of enum value identifiers
Definition at line 630 of file ast.hpp.
Referenced by EnumTypeDeclNode(), and pascal::CodeGenVisitor::visit().