blob: 6bd8b9fc19a5511ca2bf30f35650758ef2c9b486 (
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
35
36
37
|
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.
*
* @param errs
* The place to put errors.
*/
public LiteralTemplateElement(String val, ITree<String> errs) {
super(true);
this.val = val;
}
@Override
public void generate(GenerationState state) {
state.appendContents(val);
}
}
|