Skip to content

Instantly share code, notes, and snippets.

@FreeMasen
Created September 18, 2018 17:22
Show Gist options
  • Save FreeMasen/5db4c8083e56d5dd171076dcb7dbd4a2 to your computer and use it in GitHub Desktop.
Save FreeMasen/5db4c8083e56d5dd171076dcb7dbd4a2 to your computer and use it in GitHub Desktop.
enum Expression {
Binary(BinaryExpression),
Unary(Box<UnaryExpression>),
}
struct BinaryExpression {
left: Box<Expression>,
operator: Operator,
right: Box:<Expression>,
}
struct UnaryExpression {
operator: Operator,
argument: Expression,
prefix: bool,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment