AST - "this" keyword

This commit is contained in:
Emmanuel BENOîT 2023-01-09 07:53:56 +01:00
parent dbd0f6d20f
commit c9f74cdc55
2 changed files with 3 additions and 1 deletions

View file

@ -145,6 +145,8 @@ pub enum ExprNode {
/// A reference to a variable.
Variable(VariableExpr),
/// The "this" keyword.
This(VariableExpr),
/// A lambda function.
Lambda {

View file

@ -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);
}