final int pos = SimpleCharStream.getPosition();
}
{
- LOOKAHEAD(2)
- expr = ConditionalExpression() [ assignOperator = AssignmentOperator() initializer = Expression() ]
+ LOOKAHEAD(1)
+ expr = ConditionalExpression()
+ [ assignOperator = AssignmentOperator()
+ try {
+ {final int errorStart = SimpleCharStream.getPosition();}
+ initializer = Expression()
+ } catch (ParseException e) {
+ if (errorMessage != null) {
+ throw e;
+ }
+ errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', expression expected";
+ errorLevel = ERROR;
+ errorEnd = SimpleCharStream.getPosition();
+ throw e;
+ }
+ ]
{
if (assignOperator == -1) return expr;
return new VarAssignation(expr,