Fix operator precedence of '.' operator in js grammar

This commit is contained in:
Max Brunsfeld 2014-06-11 14:01:38 -07:00
parent 3cd031af38
commit 082560dd6e
5 changed files with 198 additions and 184 deletions

View file

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