@@ -113,7 +113,6 @@ $Terminals
113113 BeginLambda
114114 BeginIntersectionCast
115115 BeginTypeArguments
116- ElidedSemicolonAndRightBrace
117116 AT308
118117 AT308DOTDOTDOT
119118 BeginCaseExpr
@@ -1835,7 +1834,6 @@ PrimaryNoNewArray -> ArrayAccess
18351834-- Start of rules for JSR 335
18361835-----------------------------------------------------------------------
18371836
1838- PrimaryNoNewArray -> LambdaExpression
18391837PrimaryNoNewArray -> ReferenceExpression
18401838/: $readableName Expression:/
18411839
@@ -1931,17 +1929,12 @@ TypeElidedFormalParameter ::= Modifiersopt Identifier
19311929/: $readableName TypeElidedFormalParameter:/
19321930/: $compliance 1.8 :/
19331931
1934- -- A lambda body of the form x is really ' { ' return x; ' } '
1935- LambdaBody -> ElidedLeftBraceAndReturn Expression ElidedSemicolonAndRightBrace
1932+ LambdaBody ::= Expression
1933+ / .$putCase consumeLambdaBody( false ); $ break . /
19361934LambdaBody -> Block
19371935/: $readableName LambdaBody:/
19381936/: $compliance 1.8 :/
19391937
1940- ElidedLeftBraceAndReturn ::= $empty
1941- / .$putCase consumeElidedLeftBraceAndReturn(); $break ./
1942- /: $readableName ElidedLeftBraceAndReturn:/
1943- /: $compliance 1.8 :/
1944-
19451938-----------------------------------------------------------------------
19461939-- End of rules for JSR 335
19471940-----------------------------------------------------------------------
@@ -2261,6 +2254,7 @@ ConditionalOrExpression ::= ConditionalOrExpression '||' ConditionalAndExpressio
22612254
22622255ConditionalExpression -> ConditionalOrExpression
22632256ConditionalExpression ::= ConditionalOrExpression ' ?' Expression ' :' ConditionalExpression
2257+ ConditionalExpression ::= ConditionalOrExpression ' ?' Expression ' :' LambdaExpression
22642258/ .$putCase consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ; $break ./
22652259/: $readableName Expression:/
22662260
@@ -2308,10 +2302,8 @@ AssignmentOperator ::= '|='
23082302/: $readableName AssignmentOperator:/
23092303/: $recovery_template =:/
23102304
2311- -- For handling lambda expressions, we need to know when a full Expression
2312- -- has been reduced.
2313- Expression ::= AssignmentExpression
2314- / .$putCase consumeExpression(); $break ./
2305+ Expression -> LambdaExpression
2306+ Expression -> AssignmentExpression
23152307/: $readableName Expression:/
23162308/: $recovery_template Identifier:/
23172309
@@ -3206,3 +3198,5 @@ COLON_COLON ::= '::'
32063198
32073199$end
32083200-- need a carriage return after the $end
3201+
3202+
0 commit comments