* It will be used by fields and formal parameters
*/
static final public VariableDeclaration VariableDeclaratorNoSuffix() throws ParseException {
- final Token dollar, token, lbrace,rbrace;
+ final Token token, lbrace,rbrace;
Expression expr, initializer = null;
Token assignToken;
Variable variable;
- dollar = jj_consume_token(DOLLAR);
+ jj_consume_token(DOLLAR);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case IDENTIFIER:
token = jj_consume_token(IDENTIFIER);
- variable = new Variable(token.image,dollar.sourceStart,token.sourceEnd);
+ variable = new Variable(token.image,token.sourceStart,token.sourceEnd);
break;
case LBRACE:
lbrace = jj_consume_token(LBRACE);
expr = Expression();
rbrace = jj_consume_token(RBRACE);
- variable = new Variable(expr,dollar.sourceStart,rbrace.sourceEnd);
+ variable = new Variable(expr,lbrace.sourceStart,rbrace.sourceEnd);
break;
default:
jj_la1[10] = jj_gen;
final Token token;
token = jj_consume_token(DOLLAR);
variable = Var(token);
- {if (true) return new Variable(variable,token.sourceStart,variable.sourceEnd);}
+ {if (true) return new Variable(variable,token.sourceEnd,variable.sourceEnd);}
throw new Error("Missing return statement in function");
}
case DOLLAR:
token = jj_consume_token(DOLLAR);
variable = Var(token);
- {if (true) return new Variable(variable,dollar.sourceStart,variable.sourceEnd);}
+ {if (true) return new Variable(variable,dollar.sourceEnd,variable.sourceEnd);}
break;
case LBRACE:
token = jj_consume_token(LBRACE);
break;
case IDENTIFIER:
token = jj_consume_token(IDENTIFIER);
- expression = new Variable(token.image,token.sourceStart,token.sourceEnd);
+ expression = new ConstantIdentifier(token.image,token.sourceStart,token.sourceEnd);
break;
case DOLLAR:
expression = Variable();