mirror of https://github.com/cutefishos/calculator
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
399 B
C++
21 lines
399 B
C++
#ifndef CORE_OPCODE_H
|
|
#define CORE_OPCODE_H
|
|
|
|
#include <QString>
|
|
|
|
class Opcode
|
|
{
|
|
public:
|
|
|
|
enum { Nop = 0, Load, Ref, Function, Add, Sub, Neg, Mul, Div, Pow, Fact, Modulo, IntDiv };
|
|
|
|
unsigned type;
|
|
unsigned index;
|
|
|
|
Opcode(): type(Nop), index(0) {};
|
|
Opcode( unsigned t ): type(t), index(0) {};
|
|
Opcode( unsigned t, unsigned i ): type(t), index(i) {};
|
|
};
|
|
|
|
#endif // CORE_OPCODE_H
|