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 | 24 |
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); } |
