How to forward the part of the parsed tree from input to output in xtend generator?
For instance, in some cases of output code generation, I do not need to parse the parameters of some constructor/functions. I only need to put this constants, variables names, expessions, etc. directly to the output code (forward all inside braces):
input DSL code:
CREATE_OBJECT_O(3, a, 5+6 )
output(may be some Java or C++ code):
Object o = new Object_Impl(3, a, 5+6 )
some part of xtext grammar:
ParameterList:
(parameter+=Parameter ( "," parameter+=Parameter)* )?
;
Parameter:
variableExpression=VariableExpression |(texts+=TextInParameter | macroSubstitutions+=MacroSubstitution)*;