blob: 6fa69f1b1e9dbbb1ec0c9dd5d149ec9d4e808af0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
package bjc.rgens.parser.templates;
import bjc.data.ITree;
import bjc.rgens.parser.GenerationState;
/**
* Represents a literal text element.
*
* @author Ben Culkin
*/
public class LiteralTemplateElement extends TemplateElement {
/**
* The literal value of the element.
*/
public final String val;
/**
* Create a new literal template element.
*
* @param val
* The string to insert.
*/
public LiteralTemplateElement(String val, ITree<String> errs) {
super(true);
this.val = val;
}
@Override
public void generate(GenerationState state) {
state.appendContents(val);
}
}
|