From 338bffe40ffea3f7cec94e8da8d96813b7f844ff Mon Sep 17 00:00:00 2001 From: Mel Date: Mon, 18 Oct 2021 00:28:31 +0200 Subject: Parsing expressions scaffold --- src/parse/ast.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/parse/ast.rs (limited to 'src/parse/ast.rs') diff --git a/src/parse/ast.rs b/src/parse/ast.rs new file mode 100644 index 0000000..2f30eaf --- /dev/null +++ b/src/parse/ast.rs @@ -0,0 +1,16 @@ +use crate::lex::token::Token; + +#[derive(Debug)] +pub enum Expression { + Binary { + left: Box, + op: Token, + right: Box, + }, + Unary { + op: Token, + right: Box, + }, + Group(Box), + Literal(Token), +} -- cgit 1.4.1