Created
September 28, 2023 11:29
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[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