summaryrefslogtreecommitdiff
path: root/src/main/java/bjc/rgens/parser/templates/TemplateElement.java
diff options
context:
space:
mode:
authorBen Culkin <scorpress@gmail.com>2020-10-06 19:16:26 -0400
committerBen Culkin <scorpress@gmail.com>2020-10-06 19:16:26 -0400
commite9e0ca7bfe722375e7ccb25d2bafbe395b6c6a59 (patch)
tree8e8e556724683d4d10d7da1f3e85705a50ae33c6 /src/main/java/bjc/rgens/parser/templates/TemplateElement.java
parenta3ea557c0b7204f56b1499687cc7f82c5b1677a5 (diff)
Info cleanup
Diffstat (limited to 'src/main/java/bjc/rgens/parser/templates/TemplateElement.java')
-rw-r--r--src/main/java/bjc/rgens/parser/templates/TemplateElement.java24
1 files changed, 24 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
index 2d0724b..effd964 100644
--- a/src/main/java/bjc/rgens/parser/templates/TemplateElement.java
+++ b/src/main/java/bjc/rgens/parser/templates/TemplateElement.java
@@ -2,14 +2,38 @@ package bjc.rgens.parser.templates;
import bjc.rgens.parser.GenerationState;
+/**
+ * Abstract element of a template.
+ *
+ * @author Ben Culkin
+ *
+ */
public abstract class TemplateElement {
+ /**
+ * Whether or not to handle spacing.
+ */
public boolean spacing;
+ /**
+ * The template this element belongs to.
+ */
public GrammarTemplate belongsTo;
+ /**
+ * Create a new template element.
+ *
+ * @param spacing
+ * Whether or not to handle spacing.
+ */
protected TemplateElement(boolean spacing) {
this.spacing = spacing;
}
+ /**
+ * Generate this template element.
+ *
+ * @param state
+ * The state for the generation.
+ */
public abstract void generate(GenerationState state);
}