Interpreter - Handle references to "this"
This commit is contained in:
parent
f9359cfe03
commit
e46b399399
1 changed files with 3 additions and 1 deletions
|
@ -348,7 +348,9 @@ impl Interpretable for ExprNode {
|
|||
ExprNode::Unary { operator, right } => self.on_unary(es, operator, right),
|
||||
ExprNode::Grouping { expression } => expression.interpret(es),
|
||||
ExprNode::Litteral { value } => self.on_litteral(value),
|
||||
ExprNode::Variable(var_expr) => Ok(es.lookup_var(var_expr)?.into()),
|
||||
ExprNode::Variable(var_expr) | ExprNode::This(var_expr) => {
|
||||
Ok(es.lookup_var(var_expr)?.into())
|
||||
}
|
||||
ExprNode::Call {
|
||||
callee,
|
||||
right_paren,
|
||||
|
|
Loading…
Reference in a new issue