tvl-depot/users/tazjin/rlox/src/bytecode/opcode.rs

26 lines
377 B
Rust
Raw Normal View History

#[derive(Debug)]
pub enum OpCode {
/// Push a constant onto the stack.
OpConstant(usize),
// Literal pushes
OpNil,
OpTrue,
OpFalse,
/// Return from the current function.
OpReturn,
// Boolean operators
OpNot,
/// Unary negation
OpNegate,
// Arithmetic operators
OpAdd,
OpSubtract,
OpMultiply,
OpDivide,
}