Added cart support into AST
This commit is contained in:
parent
282a9a6a07
commit
e847a76c6d
|
@ -102,6 +102,11 @@ pub enum ExprKind {
|
|||
},
|
||||
Not(Box<Expr>),
|
||||
Literal(Value),
|
||||
Cart(Vec<(Expr, Expr)>),
|
||||
Index {
|
||||
cart: Box<Expr>,
|
||||
index: Box<Expr>,
|
||||
},
|
||||
Variable(String),
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue