123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #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_EQUAL_POINTER,
- 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_PRINT_POINTER,
- OP_LINE,
- OP_GOTO,
- OP_IF_GOTO,
- OP_PEEK_FALSE_GOTO,
- OP_PEEK_TRUE_GOTO,
- OP_GOSUB,
- OP_RETURN,
- TYPE_OPERATION(RETURN),
- OP_RETURN_POINTER,
- OP_RESERVE,
- OP_LOAD,
- TYPE_OPERATION(LOAD),
- TYPE_OPERATION(STORE),
- OP_DEREFERENCE_VAR,
- OP_REFERENCE,
- OP_DUPLICATE_REFERENCE,
- OP_ADD_REFERENCE,
- OP_NEW,
- OP_DELETE,
- OP_LENGTH,
- OP_STORE_POINTER,
- OP_PUSH_PRE_INT_CHANGE,
- OP_PUSH_POST_INT_CHANGE,
- OP_INT_CHANGE,
- OP_FLOAT_TO_INT,
- OP_INT_TO_FLOAT
- } Operation;
- #endif
|