Fix operator precedence of '.' operator in js grammar
This commit is contained in:
parent
3cd031af38
commit
082560dd6e
5 changed files with 198 additions and 184 deletions
|
|
@ -46,4 +46,16 @@ parses the 'in' operator
|
|||
===========================================
|
||||
print(x in y)
|
||||
---
|
||||
(program (expression_statement (function_call (identifier) (in_expression (identifier) (identifier)))))
|
||||
(program (expression_statement (function_call
|
||||
(identifier)
|
||||
(in_expression (identifier) (identifier)))))
|
||||
|
||||
============================================
|
||||
parses property access and operators
|
||||
============================================
|
||||
print(x.y.z && a.b.c)
|
||||
---
|
||||
(program (expression_statement (function_call (identifier)
|
||||
(bool_op
|
||||
(property_access (property_access (identifier) (identifier)) (identifier))
|
||||
(property_access (property_access (identifier) (identifier)) (identifier))))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue