[solved] [Xbase] java like variable declaration [message #1421470] |
Thu, 11 September 2014 12:11  |
Simon Hofer Messages: 4 Registered: September 2014 |
Junior Member |
|
|
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 13:09] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02490 seconds