0-ary tuples

This commit is contained in:
Andrey Breslav
2011-01-03 13:27:40 +03:00
parent 4d4e9cc342
commit e2fca30f22
6 changed files with 49 additions and 18 deletions
+2 -3
View File
@@ -56,9 +56,8 @@ elvisOperation
: infixFunctionCall ("?:" infixFunctionCall)*
;
// ATTENTION
infixFunctionCall
: rangeExpression (SimpleName (typeArguments | rangeExpression))*
: rangeExpression (SimpleName rangeExpression)*
;
rangeExpression
@@ -198,7 +197,7 @@ jump
tupleLiteral // Ambiguity when after a SimpleName (infix call). In this case (e) is treated as an expression in parentheses
// to put a tuple, write write ((e))
: "(" expression{","} ")"
: "(" ((SimpleName "=")? expression){","} ")"
;
functionLiteral // one can use "it" as a parameter name