123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #ifndef OPERATION_H
- #define OPERATION_H
- #define NUMBER_OPERATION(name) OP_##name##_INT, OP_##name##_FLOAT
- #define TYPE_OPERATION(name) \
- OP_##name##_INT, OP_##name##_FLOAT, OP_##name##_BOOL
- typedef enum Operation {
- OP_NOTHING,
- NUMBER_OPERATION(PUSH),
- OP_PUSH_TRUE,
- OP_PUSH_FALSE,
- NUMBER_OPERATION(ADD),
- NUMBER_OPERATION(SUB),
- NUMBER_OPERATION(MUL),
- NUMBER_OPERATION(DIV),
- OP_MOD_INT,
- NUMBER_OPERATION(INVERT_SIGN),
- NUMBER_OPERATION(LESS),
- NUMBER_OPERATION(GREATER),
- NUMBER_OPERATION(EQUAL),
- OP_EQUAL_BOOL,
- OP_NOT,
- OP_AND,
- OP_OR,
- OP_BIT_NOT,
- OP_BIT_AND,
- OP_BIT_OR,
- OP_BIT_XOR,
- OP_LEFT_SHIFT,
- OP_RIGHT_SHIFT,
- TYPE_OPERATION(PRINT),
- OP_LINE,
- OP_GOTO,
- OP_IF_GOTO,
- OP_PEEK_FALSE_GOTO,
- OP_PEEK_TRUE_GOTO,
- OP_GOSUB,
- OP_RETURN,
- TYPE_OPERATION(RETURN),
- OP_RESERVE,
- TYPE_OPERATION(LOAD),
- TYPE_OPERATION(STORE),
- OP_INT_ARRAY,
- OP_STORE_ARRAY
- } Operation;
- #endif
|