| [xtend] Casting to Subclass in Template [message #782282] |
Mon, 23 January 2012 08:05  |
Sebastian Burg Messages: 9 Registered: November 2011 |
Junior Member |
|
|
I have a XText Grammar, which shall be used to fill out a template.
In this Grammar i have a type
VI:
'{' (vus+=VU)+ '}'
;
VU_unit:
Ref|Prop
;
Ref:
'var' variable=ID
;
Prop:
'prop' verif=VD
;
I walk through the given "VU"'s, and can react if something is a Ref or a Prop, but i can't seem to find a way to access the parts variable or respectively verif.
with given p
'''
«FOR st:p.VI.VU_unit»
«IF st instanceof Ref»
WHAT TO DO HERE TO WRITE Ref.variable?
«ENDIF»
«ENDFOR»
'''
I cant find a way how to do it.... Please help. Thanks
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01564 seconds