diff options
Diffstat (limited to 'src/main/java/bjc/rgens/parser/templates/TemplateElement.java')
| -rw-r--r-- | src/main/java/bjc/rgens/parser/templates/TemplateElement.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/java/bjc/rgens/parser/templates/TemplateElement.java b/src/main/java/bjc/rgens/parser/templates/TemplateElement.java new file mode 100644 index 0000000..dc123f3 --- /dev/null +++ b/src/main/java/bjc/rgens/parser/templates/TemplateElement.java @@ -0,0 +1,27 @@ +package bjc.rgens.parser.templates; + +import bjc.rgens.parser.GenerationState; + +public abstract class TemplateElement { + public static enum ElementType { + LITERAL(true), + TEMPLATE(true), + PRAGMA(false); + + public final boolean spacing; + + private ElementType(boolean spacing) { + this.spacing = spacing; + } + } + + public final ElementType type; + + public GrammarTemplate belongsTo; + + protected TemplateElement(ElementType type) { + this.type = type; + } + + public abstract void generate(GenerationState state); +} |
