This commit is contained in:
Andrey Breslav
2011-02-24 16:01:51 +03:00
parent c2c9f51ca8
commit bfe22843ce
21 changed files with 1086 additions and 530 deletions
+13 -6
View File
@@ -82,7 +82,7 @@ atomicExpression
: literalConstant
: functionLiteral
: tupleLiteral
: "this" ("<" type ">")?
: "this" label? ("<" type ">")?
: if
: when
: try
@@ -97,6 +97,12 @@ atomicExpression
: "namespace" // for the root namespace
;
label
: "@"
: "@@"
: LabelName
;
literalConstant
: "true" | "false"
: StringWithTemplates
@@ -163,12 +169,13 @@ prefixUnaryOperation
: "++" : "--"
: "!" // No ~
: attributes // mandatory
: label
;
postfixUnaryOperation
: "++" : "--"
: typeArguments? valueArguments
: typeArguments
: typeArguments? valueArguments (label? functionLiteral)
: typeArguments (label? functionLiteral)
: arrayAccess
: memberAccessOperation postfixUnaryOperation // TODO: Review
;
@@ -187,9 +194,9 @@ valueArguments
jump
: "throw" expression
: "return" expression?
: "continue" stringLiteral?
: "break" stringLiteral?
: "return" label? expression?
: "continue" label?
: "break" label?
// yield ?
;
+1
View File
@@ -1,5 +1,6 @@
SimpleName : /*java identifier*/;
FieldName : "$" SimpleName;
LabelName : "@" SimpleName;
[helper] Digit : ["0".."9"];
IntegerLiteral : Digit+ "L"?
[helper] HexDigit : Digit | ["A"-"F", "a"-"f"];