Add string support to the frontend
This commit is contained in:
parent
32a5c0ff0f
commit
39656a3801
10 changed files with 95 additions and 11 deletions
|
|
@ -29,6 +29,7 @@ impl<'a> Interpreter<'a> {
|
|||
Expr::Ident(id, _) => self.resolve(id),
|
||||
Expr::Literal(Literal::Int(i), _) => Ok((*i).into()),
|
||||
Expr::Literal(Literal::Bool(b), _) => Ok((*b).into()),
|
||||
Expr::Literal(Literal::String(s), _) => Ok(s.clone().into()),
|
||||
Expr::UnaryOp { op, rhs, .. } => {
|
||||
let rhs = self.eval(rhs)?;
|
||||
match op {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue