Search in sources :

Example 1 with TemplateNode

use of org.eclipse.xtext.generator.trace.node.TemplateNode in project xtext-core by eclipse.

the class GeneratorNodeExtensions method appendTemplate.

/**
 * Creates a template node for the given templateString and appends it to the given parent node.
 *
 * Templates are translated to generator node trees and expressions in templates can be of type IGeneratorNode.
 *
 * @return the given parent node
 */
public CompositeGeneratorNode appendTemplate(final CompositeGeneratorNode parent, final StringConcatenationClient templateString) {
    final TemplateNode proc = new TemplateNode(templateString, this);
    List<IGeneratorNode> _children = parent.getChildren();
    _children.add(proc);
    return parent;
}
Also used : TemplateNode(org.eclipse.xtext.generator.trace.node.TemplateNode) IGeneratorNode(org.eclipse.xtext.generator.trace.node.IGeneratorNode)

Aggregations

IGeneratorNode (org.eclipse.xtext.generator.trace.node.IGeneratorNode)1 TemplateNode (org.eclipse.xtext.generator.trace.node.TemplateNode)1