diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2018-06-07 20:37:51 -0300 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2018-06-07 20:37:51 -0300 |
| commit | 44a8d9d2d56a311293ec86ea40df7126748300a1 (patch) | |
| tree | cc53c34a97a403ddb4a8d112f09124ee42c4507a /src/main/java/bjc/rgens/parser/templates/TemplateElement.java | |
| parent | 7422af49fa5c4da57323abe676a99468d401c44b (diff) | |
Refactoring
The main refactoring here is removing the type field from the various
classes, but there are a few other smaller ones.
This also contains the grounds for a refactoring on variable use
Diffstat (limited to 'src/main/java/bjc/rgens/parser/templates/TemplateElement.java')
| -rw-r--r-- | src/main/java/bjc/rgens/parser/templates/TemplateElement.java | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/main/java/bjc/rgens/parser/templates/TemplateElement.java b/src/main/java/bjc/rgens/parser/templates/TemplateElement.java index dc123f3..2d0724b 100644 --- a/src/main/java/bjc/rgens/parser/templates/TemplateElement.java +++ b/src/main/java/bjc/rgens/parser/templates/TemplateElement.java @@ -3,24 +3,12 @@ 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 boolean spacing; public GrammarTemplate belongsTo; - protected TemplateElement(ElementType type) { - this.type = type; + protected TemplateElement(boolean spacing) { + this.spacing = spacing; } public abstract void generate(GenerationState state); |
