Simplify lambda pursing even further

- Remove a redundant case
 - Restrict grammar according to spec with a simpler scenario
This commit is contained in:
Juan Martín Sotuyo Dodero
2016-10-14 09:24:06 -03:00
parent a046b8f93d
commit 478ed3463c

View File

@ -1812,8 +1812,7 @@ void PrimaryPrefix() :
Literal()
| LOOKAHEAD(2) "this" {jjtThis.setUsesThisModifier();}
| "super" {jjtThis.setUsesSuperModifier();}
| LOOKAHEAD( "(" ")" "->" ) LambdaExpression()
| LOOKAHEAD( VariableDeclaratorId() "->" ) LambdaExpression()
| LOOKAHEAD( <IDENTIFIER> "->" ) LambdaExpression()
| LOOKAHEAD( "(" VariableDeclaratorId() ( "," VariableDeclaratorId() )* ")" "->" ) LambdaExpression()
| LOOKAHEAD( FormalParameters() "->" ) LambdaExpression()
| LOOKAHEAD(3) "(" Expression() ")"