Hi,
I want to use XBase as expression language and shrank it to fit my needs. Now I have a problem and can't find a way to fix it. For variable declaration XBase has the rule
VariableDeclaration returns Expression:
{VariableDeclaration}
'def' (=> (type=JvmTypeReference name=ValidID) | name=ValidID) ('=' right=Expression)?
;
But I don't want to use def as keyword. I'd like to write things like
int value = 15
value = 13
Atm the code above is interpreted as "int" is a FeatureCall and "value=15" is an Assignment, but "int value = 15" as whole should be an Assignment. When I delete "def" in the rule I get an error message while running the generator. I didn't touch anything, just shrank the XBase code.
[Updated on: Thu, 11 September 2014 09:09] by Moderator