KT-2627 Parse for with multiple range variables

#KT-2627 Fixed
This commit is contained in:
Andrey Breslav
2012-08-21 19:08:41 +04:00
parent d8e8145954
commit af85c99ffd
9 changed files with 738 additions and 26 deletions
+5 -1
View File
@@ -85,10 +85,14 @@ variableDeclarationEntry
: SimpleName (":" type)?
;
multipleVariableDeclarations
: "(" variableDeclarationEntry{","} ")"
;
property
: modifiers ("val" | "var")
typeParameters? (type "." | annotations)?
("(" variableDeclarationEntry{","} ")" | variableDeclarationEntry)
(multipleVariableDeclarations | variableDeclarationEntry)
typeConstraints
("=" expression SEMI?)?
(getter? setter? | setter? getter?) SEMI?
+1 -1
View File
@@ -27,7 +27,7 @@ loop
;
for
: "for" "(" annotations ("val" | "var")? SimpleName (":" type)? "in" expression ")" expression
: "for" "(" annotations ("val" | "var")? (multipleVariableDeclarations | variableDeclarationEntry) "in" expression ")" expression
;
while