

Definition at line 146 of file cmd.cc.
Public Member Functions | |
| BinaryCmd (const Token &t) | |
| virtual void | toStream (std::ostream &str) const |
| dump command to stream in human-readable format | |
| virtual bool | exec (FncDefinition *fnc) |
| execute command in the context of calling function | |
| bool | chkTypes (Value::VType, Value::VType) |
Private Member Functions | |
| int | cmp (PConstValue, PConstValue) |
| void | aluOp (PValue, PConstValue) |
| bool | divide (PValue, PConstValue) |
Private Attributes | |
| Token | t_ |
| virtual void toStream | ( | std::ostream & | ) | const [inline, virtual] |
dump command to stream in human-readable format
Implements ICmd.
Definition at line 153 of file cmd.cc.
References StreamDecorator::C_LIGHT_CYAN, StreamDecorator::C_NO_COLOR, and t_.
| bool exec | ( | FncDefinition * | ) | [virtual] |
execute command in the context of calling function
Implements ICmd.
Definition at line 661 of file cmd.cc.
References aluOp(), Value::boolVal, chkTypes(), cmp(), ValueFactory::create(), divide(), StreamDecorator::E_ERROR, StreamDecorator::E_NOTE, ETOKEN_KW_AND, ETOKEN_KW_DIV, ETOKEN_KW_EQ, ETOKEN_KW_NEQ, ETOKEN_KW_OR, ETOKEN_OP_GREATER, ETOKEN_OP_GREATER_EQ, ETOKEN_OP_LESS, ETOKEN_OP_LESS_EQ, ETOKEN_OP_MINUS, ETOKEN_OP_PLUS, ETOKEN_OP_SLASH, ETOKEN_OP_STAR, Vm::fileName, ValueStack::pop(), ValueStack::push(), Value::stringVal, t_, Token::type, Value::type, Value::V_STRING, and Vm::vmStack.

| bool chkTypes | ( | Value::VType | t1, | |
| Value::VType | t2 | |||
| ) |
Definition at line 556 of file cmd.cc.
References ETOKEN_KW_AND, ETOKEN_KW_DIV, ETOKEN_KW_EQ, ETOKEN_KW_NEQ, ETOKEN_KW_OR, ETOKEN_OP_GREATER, ETOKEN_OP_GREATER_EQ, ETOKEN_OP_LESS, ETOKEN_OP_LESS_EQ, ETOKEN_OP_MINUS, ETOKEN_OP_PLUS, ETOKEN_OP_SLASH, ETOKEN_OP_STAR, t_, Token::type, Value::V_BOOL, Value::V_DOUBLE, Value::V_INT, and Value::V_STRING.
Referenced by exec().

| int cmp | ( | PConstValue | val1, | |
| PConstValue | val2 | |||
| ) | [private] |
Definition at line 599 of file cmd.cc.
References Value::doubleVal, Value::intVal, Value::stringVal, Value::type, Value::V_DOUBLE, and Value::V_STRING.
Referenced by exec().

| void aluOp | ( | PValue | dst, | |
| PConstValue | src | |||
| ) | [private] |
Definition at line 615 of file cmd.cc.
References Value::doubleVal, ETOKEN_OP_MINUS, ETOKEN_OP_PLUS, ETOKEN_OP_STAR, Value::intVal, t_, Token::type, Value::type, Value::V_DOUBLE, and Value::V_INT.
Referenced by exec().

| bool divide | ( | PValue | dst, | |
| PConstValue | src | |||
| ) | [private] |
Definition at line 642 of file cmd.cc.
References Value::doubleVal, ETOKEN_KW_DIV, Value::intVal, t_, Token::type, Value::type, Value::V_DOUBLE, and Value::V_INT.
Referenced by exec().

Definition at line 160 of file cmd.cc.
Referenced by aluOp(), BinaryCmd(), chkTypes(), divide(), exec(), and toStream().
1.5.4