Parse collection literals as atomic expressions

This commit is contained in:
Mikhail Zarechenskiy
2017-03-17 12:40:47 +03:00
parent 3c7678092e
commit d3fd96ceed
10 changed files with 341 additions and 45 deletions
+5
View File
@@ -120,6 +120,7 @@ atomicExpression
: objectLiteral
: jump
: loop
: collectionLiteral
: SimpleName
;
@@ -275,3 +276,7 @@ arrayAccess
objectLiteral
: "object" (":" delegationSpecifier{","})? classBody
;
collectionLiteral
: "[" element{","}? "]"
;