Skip to content

Instantly share code, notes, and snippets.

@Pavel-Durov
Created September 28, 2023 11:29
Show Gist options
  • Save Pavel-Durov/22c5966133886909b8691b26f70a587c to your computer and use it in GitHub Desktop.
Save Pavel-Durov/22c5966133886909b8691b26f70a587c to your computer and use it in GitHub Desktop.
Writing an Interpreter in Rust: Bytecode and Stack-based VM - ast.rs
#[derive(Debug)]
pub enum Node {
Add { lhs: Box<Node>, rhs: Box<Node> },
Mul { lhs: Box<Node>, rhs: Box<Node> },
Number { value: u64 },
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment