diff --git a/src/ast.rs b/src/ast.rs index 7532df0..63029f4 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -145,6 +145,8 @@ pub enum ExprNode { /// A reference to a variable. Variable(VariableExpr), + /// The "this" keyword. + This(VariableExpr), /// A lambda function. Lambda { diff --git a/src/dumper.rs b/src/dumper.rs index 20c4ccd..f7431fc 100644 --- a/src/dumper.rs +++ b/src/dumper.rs @@ -217,7 +217,7 @@ fn dump_expr_node(dumper: &mut Dumper, expr: &ExprNode) { dumper.current_line().push_str(&value.lexeme); } - ExprNode::Variable(var) => { + ExprNode::Variable(var) | ExprNode::This(var) => { dumper.current_line().push_str(&var.token.lexeme); }