Introduce ++ operator into grammar
This commit is contained in:
@@ -12,5 +12,5 @@ annotation
|
|||||||
;
|
;
|
||||||
|
|
||||||
annotationEntry
|
annotationEntry
|
||||||
: "@"? SimpleName{"."} typeArguments? valueArguments?
|
: "@"? ++ SimpleName{"."} typeArguments? valueArguments?
|
||||||
;
|
;
|
||||||
@@ -126,11 +126,11 @@ atomicExpression
|
|||||||
;
|
;
|
||||||
|
|
||||||
labelReference
|
labelReference
|
||||||
: "@" LabelName
|
: "@" ++ LabelName
|
||||||
;
|
;
|
||||||
|
|
||||||
labelDefinition
|
labelDefinition
|
||||||
: LabelName "@"
|
: LabelName ++ "@"
|
||||||
;
|
;
|
||||||
|
|
||||||
literalConstant
|
literalConstant
|
||||||
@@ -246,9 +246,9 @@ valueArguments
|
|||||||
|
|
||||||
jump
|
jump
|
||||||
: "throw" expression
|
: "throw" expression
|
||||||
: "return" labelReference? expression?
|
: "return" ++ labelReference? expression?
|
||||||
: "continue" labelReference?
|
: "continue" ++ labelReference?
|
||||||
: "break" labelReference?
|
: "break" ++ labelReference?
|
||||||
// yield ?
|
// yield ?
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
modifiers
|
modifiers
|
||||||
: ("@"? modifier)*
|
: modifier*
|
||||||
;
|
;
|
||||||
|
|
||||||
modifier
|
modifier
|
||||||
|
: "@"? ++ modifierKeyword
|
||||||
|
;
|
||||||
|
|
||||||
|
modifierKeyword
|
||||||
: classModifier
|
: classModifier
|
||||||
: accessModifier
|
: accessModifier
|
||||||
: varianceAnnotation
|
: varianceAnnotation
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ Operator `|` denotes _alternative_.<br>
|
|||||||
Operator `*` denotes _iteration_ (zero or more).<br>
|
Operator `*` denotes _iteration_ (zero or more).<br>
|
||||||
Operator `+` denotes _iteration_ (one or more).<br>
|
Operator `+` denotes _iteration_ (one or more).<br>
|
||||||
Operator `?` denotes _option_ (zero or one).<br>
|
Operator `?` denotes _option_ (zero or one).<br>
|
||||||
alpha`{`beta`}` denotes a nonempty _beta_-separated list of _alpha_'s.
|
alpha`{`beta`}` denotes a nonempty _beta_-separated list of _alpha_'s. <br>
|
||||||
|
Operator ``++'' means that no space or comment allowed between operands.
|
||||||
|
|
||||||
# Semicolons
|
# Semicolons
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user