File tree 3 files changed +4039
-3292
lines changed 3 files changed +4039
-3292
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,7 @@ module.exports = grammar
199
199
@type_op ,
200
200
@_paren_expression ,
201
201
202
+ @this_expression ,
202
203
@identifier ,
203
204
@number ,
204
205
@string ,
@@ -322,6 +323,8 @@ module.exports = grammar
322
323
/ \d + / ,
323
324
optional (seq (" ." , / \d * / )))))
324
325
326
+ this_expression : -> " this"
327
+
325
328
identifier : -> / [\a _$][\a \d _$] * /
326
329
327
330
true : -> " true"
Original file line number Diff line number Diff line change 49
49
Booleans
50
50
============================================
51
51
52
+ this;
52
53
null;
53
54
undefined;
54
55
true;
57
58
---
58
59
59
60
(program
61
+ (expression_statement (this_expression))
60
62
(expression_statement (null))
61
63
(expression_statement (undefined))
62
64
(expression_statement (true))
@@ -190,7 +192,7 @@ return this.map(function (a) {
190
192
(function_call
191
193
(member_access
192
194
(function_call
193
- (member_access (identifier ) (identifier))
195
+ (member_access (this_expression ) (identifier))
194
196
(arguments
195
197
(function (formal_parameters (identifier)) (statement_block
196
198
(return_statement (member_access (identifier) (identifier)))))))
You can’t perform that action at this time.
0 commit comments