#include <vm.h>
Definition at line 37 of file vm.h.
Public Types | |
| enum | VType { V_NULL = 0, V_BOOL, V_INT, V_DOUBLE, V_STRING } |
Public Member Functions | |
| Value () | |
| initialize null value | |
Public Attributes | |
| VType | type |
| value type | |
| bool | boolVal |
| valid only if type == V_BOOL | |
| int | intVal |
| valid only if type == V_INT | |
| double | doubleVal |
| valid only if type == V_DOUBLE | |
| std::string | stringVal |
| valid only if type == V_STRING | |
value type
Definition at line 45 of file vm.h.
Referenced by BinaryCmd::aluOp(), BinaryCmd::cmp(), CmdFactory::createAssign(), CmdFactory::createPush(), BinaryCmd::divide(), PrintCmd::exec(), WhileCmd::exec(), IfCmd::exec(), BinaryCmd::exec(), UnaryCmd::exec(), Builder::fncCall(), operator<<(), operator==(), ValueStack::popToVar(), PrintCmd::PrintCmd(), ValueStack::push(), and PrintCmd::toStream().
| bool boolVal |
valid only if type == V_BOOL
Definition at line 47 of file vm.h.
Referenced by WhileCmd::exec(), BinaryCmd::exec(), UnaryCmd::exec(), and operator<<().
| int intVal |
valid only if type == V_INT
Definition at line 48 of file vm.h.
Referenced by BinaryCmd::aluOp(), BinaryCmd::cmp(), BinaryCmd::divide(), PrintCmd::exec(), UnaryCmd::exec(), and operator<<().
| double doubleVal |
valid only if type == V_DOUBLE
Definition at line 49 of file vm.h.
Referenced by BinaryCmd::aluOp(), BinaryCmd::cmp(), BinaryCmd::divide(), PrintCmd::exec(), UnaryCmd::exec(), and operator<<().
| std::string stringVal |
valid only if type == V_STRING
Definition at line 50 of file vm.h.
Referenced by BinaryCmd::cmp(), PrintCmd::exec(), BinaryCmd::exec(), and operator<<().
1.5.4