|
MXVM 1.8.1
Virtual Machine, Compiler, and Pascal Frontend
|
AST node for a variable declaration in a .data section. More...
#include <ast.hpp>

Public Member Functions | |
| VariableNode (VarType varType, const std::string &varName) | |
| VariableNode (VarType varType, const std::string &varName, size_t buf_size) | |
| VariableNode (VarType varType, const std::string &varName, const std::string &value) | |
| void | accept (ASTVisitor &visitor) override |
| std::string | toString () const override |
| Public Member Functions inherited from mxvm::ASTNode | |
| virtual | ~ASTNode ()=default |
Public Attributes | |
| std::string | name |
| VarType | type |
| std::string | initialValue |
| bool | hasInitializer |
| size_t | buffer_size = 0 |
| buffer allocation size (for pointer/array types) | |
| bool | is_global = false |
| std::string | object |
| owning object name, if any | |
|
inline |
Definition at line 81 of file ast.hpp.
References buffer_size, hasInitializer, name, and type.
|
inline |
Definition at line 84 of file ast.hpp.
References buffer_size, hasInitializer, name, and type.
|
inline |
Definition at line 87 of file ast.hpp.
References buffer_size, hasInitializer, initialValue, name, and type.
|
overridevirtual |
Implements mxvm::ASTNode.
Definition at line 54 of file ast.cpp.
References mxvm::ASTVisitor::visit().
|
overridevirtual |
Implements mxvm::ASTNode.
Definition at line 58 of file ast.cpp.
References hasInitializer, initialValue, name, and type.
| size_t mxvm::VariableNode::buffer_size = 0 |
buffer allocation size (for pointer/array types)
Definition at line 77 of file ast.hpp.
Referenced by VariableNode(), VariableNode(), and VariableNode().
| bool mxvm::VariableNode::hasInitializer |
Definition at line 76 of file ast.hpp.
Referenced by VariableNode(), VariableNode(), VariableNode(), and toString().
| std::string mxvm::VariableNode::initialValue |
Definition at line 75 of file ast.hpp.
Referenced by VariableNode(), and toString().
| std::string mxvm::VariableNode::name |
Definition at line 73 of file ast.hpp.
Referenced by VariableNode(), VariableNode(), VariableNode(), and toString().
| std::string mxvm::VariableNode::object |
| VarType mxvm::VariableNode::type |
Definition at line 74 of file ast.hpp.
Referenced by VariableNode(), VariableNode(), VariableNode(), and toString().