diff --git a/src/ast.rs b/src/ast.rs index f84c47af..3fede855 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -102,6 +102,11 @@ pub enum ExprKind { }, Not(Box), Literal(Value), + Cart(Vec<(Expr, Expr)>), + Index { + cart: Box, + index: Box, + }, Variable(String), } diff --git a/src/interpret.rs b/src/interpret.rs index 73180564..888b314e 100644 --- a/src/interpret.rs +++ b/src/interpret.rs @@ -195,6 +195,7 @@ impl ExecEnv { } Not(expr) => Bool(!self.eval_expr(&expr)?.into_bool()), Literal(value) => value.clone(), + Cart(_) | Index { .. } => todo!("cart support"), // TODO: not too happy with constructing an artificial // Iden here.