*/
VariableDeclaration VariableDeclaratorNoSuffix() :
{
- final Token dollar, token, lbrace,rbrace;
+ final Token token, lbrace,rbrace;
Expression expr, initializer = null;
Token assignToken;
Variable variable;
}
{
- dollar = <DOLLAR>
+ <DOLLAR>
(
token = <IDENTIFIER>
- {variable = new Variable(token.image,dollar.sourceStart,token.sourceEnd);}
+ {variable = new Variable(token.image,token.sourceStart,token.sourceEnd);}
|
lbrace = <LBRACE> expr = Expression() rbrace = <RBRACE>
- {variable = new Variable(expr,dollar.sourceStart,rbrace.sourceEnd);}
+ {variable = new Variable(expr,lbrace.sourceStart,rbrace.sourceEnd);}
)
[
assignToken = <ASSIGN>
{
token = <DOLLAR> variable = Var(token)
{
- return new Variable(variable,token.sourceStart,variable.sourceEnd);
+ return new Variable(variable,token.sourceEnd,variable.sourceEnd);
}
}
}
{
token = <DOLLAR> variable = Var(token)
- {return new Variable(variable,dollar.sourceStart,variable.sourceEnd);}
+ {return new Variable(variable,dollar.sourceEnd,variable.sourceEnd);}
|
token = <LBRACE> expression = Expression() token2 = <RBRACE>
{
}
|
token = <IDENTIFIER>
- {expression = new Variable(token.image,token.sourceStart,token.sourceEnd);}
+ {expression = new ConstantIdentifier(token.image,token.sourceStart,token.sourceEnd);}
|
expression = Variable()
)