use crate::tokens::Position; #[derive(Debug)] pub struct Node { pub value: T, pub pos: Position, } #[derive(Debug)] pub enum Expr { Unit, Id(String), Int(i64), Float(f64), String(String), Bool(bool), Array(Vec>), Object(Vec), Tuple(Vec>), Member { subject: Box>, value: String, }, Index { subject: Box>, value: Box>, }, Call { subject: Box>, arguments: Vec>, }, Unary { unary_type: UnaryType, subject: Box>, }, Binary { binary_type: BinaryType, left: Box>, right: Box>, }, } #[derive(Debug)] pub enum ObjectEntry { Pair(Box>, Box), } #[derive(Debug)] pub enum UnaryType { Not, Negate, Reference, ReferenceMut, Dereference, } #[derive(Debug)] pub enum BinaryType { Exponentiate, Multiply, Divide, Modulo, Add, Subtract, LT, LTE, GT, GTE, In, Equal, Inequal, And, Or, }