Add variable resolution; the error behavior is pretty bad here.

This commit is contained in:
2022-02-20 21:08:01 -08:00
parent f45488b9af
commit 9d82c8ca2d
12 changed files with 549 additions and 36 deletions

View File

@@ -31,7 +31,6 @@ where
pub enum Statement {
Binding(Location, String, Expression),
Print(Location, String),
Expr(Location, Expression),
}
impl<'a, 'b, D, A> Pretty<'a, D, A> for &'b Statement
@@ -51,7 +50,6 @@ where
.text("print")
.append(allocator.space())
.append(allocator.text(var.to_string())),
Statement::Expr(_, expr) => expr.pretty(allocator),
}
}
}