Navigating the model tree with xtend [message #778192] |
Wed, 11 January 2012 10:25  |
Eclipse User |
|
|
|
Hi,
I have to convert an Xtext code generator from version 1 to 2 and I'm having some conversion issues. It's been a while since I last used Xtext.
With my model looking something like
MyModel:
(variables += MyVariable)*;
MyVariable:
value = MyValue;
I used to write "model.variables.value" to get the values of all variables in the model. However, this does not seem to work anymore.
Do I need to iterate over the variables, like
«FOR v:variables»
«v.value»
«ENDFOR»
to access the variable values? This seems rather cumbersome, even more so if value were to be another list of subvalues.
On a related note, am I right that the FOREACH statement has vanished as well?
Thanks
|
|
|
|
Powered by
FUDForum. Page generated in 0.51071 seconds