Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions org.eclipse.jdt.core.compiler.batch/grammar/java.g
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ $Terminals
BeginLambda
BeginIntersectionCast
BeginTypeArguments
ElidedSemicolonAndRightBrace
AT308
AT308DOTDOTDOT
BeginCaseExpr
Expand Down Expand Up @@ -1835,7 +1834,6 @@ PrimaryNoNewArray -> ArrayAccess
-- Start of rules for JSR 335
-----------------------------------------------------------------------

PrimaryNoNewArray -> LambdaExpression
PrimaryNoNewArray -> ReferenceExpression
/:$readableName Expression:/

Expand Down Expand Up @@ -1931,17 +1929,12 @@ TypeElidedFormalParameter ::= Modifiersopt Identifier
/:$readableName TypeElidedFormalParameter:/
/:$compliance 1.8:/

-- A lambda body of the form x is really '{' return x; '}'
LambdaBody -> ElidedLeftBraceAndReturn Expression ElidedSemicolonAndRightBrace
LambdaBody ::= Expression
/.$putCase consumeLambdaBody(false); $break ./
LambdaBody -> Block
/:$readableName LambdaBody:/
/:$compliance 1.8:/

ElidedLeftBraceAndReturn ::= $empty
/.$putCase consumeElidedLeftBraceAndReturn(); $break ./
/:$readableName ElidedLeftBraceAndReturn:/
/:$compliance 1.8:/

-----------------------------------------------------------------------
-- End of rules for JSR 335
-----------------------------------------------------------------------
Expand Down Expand Up @@ -2261,6 +2254,7 @@ ConditionalOrExpression ::= ConditionalOrExpression '||' ConditionalAndExpressio

ConditionalExpression -> ConditionalOrExpression
ConditionalExpression ::= ConditionalOrExpression '?' Expression ':' ConditionalExpression
ConditionalExpression ::= ConditionalOrExpression '?' Expression ':' LambdaExpression
/.$putCase consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ; $break ./
/:$readableName Expression:/

Expand Down Expand Up @@ -2308,10 +2302,8 @@ AssignmentOperator ::= '|='
/:$readableName AssignmentOperator:/
/:$recovery_template =:/

-- For handling lambda expressions, we need to know when a full Expression
-- has been reduced.
Expression ::= AssignmentExpression
/.$putCase consumeExpression(); $break ./
Expression -> LambdaExpression
Expression -> AssignmentExpression
/:$readableName Expression:/
/:$recovery_template Identifier:/

Expand Down Expand Up @@ -3206,3 +3198,5 @@ COLON_COLON ::= '::'

$end
-- need a carriage return after the $end


1 change: 1 addition & 0 deletions org.eclipse.jdt.core.compiler.batch/scripts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/GenerateParserScript.class
Loading