use crate::lexer::TokenKind; /// A tree structure of a statement. #[derive(Debug, Clone, PartialEq)] pub enum Stmt { VarDecl(String, Box), FnDecl(String, Vec, Box), UnitDecl(String, String, Box), /// For simplicity, expressions can be put into statements. This is the form in which expressions are passed to the interpreter. Expr(Box), } /// A tree structure of an expression. #[derive(Debug, Clone, PartialEq)] pub enum Expr { Binary(Box, TokenKind, Box), Unary(TokenKind, Box), Unit(String, Box), Var(String), Group(Box), FnCall(String, Vec), Literal(String), }