mirror of
https://github.com/TheM1Stery/izanami.git
synced 2025-04-19 16:31:11 +00:00
chore: remove unused code
This commit is contained in:
parent
dd0b2880df
commit
7a43d22b77
@ -85,10 +85,6 @@ fn evaluate(expr: &Expr, environment: &mut Environment) -> Result<LiteralType, R
|
||||
Expr::Grouping { expression } => evaluate(expression, environment),
|
||||
Expr::Literal { value } => Ok(value.clone()),
|
||||
Expr::Unary { op, right } => Ok(unary(&evaluate(right, environment)?, op)),
|
||||
//Expr::Variable { name } => environment.get(name).ok_or_else(|| RuntimeError {
|
||||
// token: name.clone(),
|
||||
// message: format!("Undefined variable {}.", name.lexeme),
|
||||
//}),
|
||||
Expr::Variable { name } => environment
|
||||
.get(name)
|
||||
.ok_or_else(|| RuntimeError {
|
||||
|
Loading…
Reference in New Issue
Block a user