about summary refs log tree commit diff
path: root/users/tazjin/rlox/src/bytecode/opcode.rs
blob: 0f070ce9fffc0df7fdb5971e1f6f1b8c426693bb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[derive(Debug)]
pub enum OpCode {
    /// Access a constant for use.
    OpConstant(usize),

    /// Return from the current function.
    OpReturn,

    /// Unary negation
    OpNegate,

    // Arithmetic operators
    OpAdd,
    OpSubtract,
    OpMultiply,
    OpDivide,
}