From c524f46dbd6a460b7374690244888a001023d3af Mon Sep 17 00:00:00 2001 From: "Benjamin J. Culkin" Date: Tue, 29 May 2018 19:44:40 -0300 Subject: Refactor to split RuleCase RuleCase now handles its own generation. --- src/main/java/bjc/rgens/parser/RuleCase.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java/bjc/rgens/parser/RuleCase.java') diff --git a/src/main/java/bjc/rgens/parser/RuleCase.java b/src/main/java/bjc/rgens/parser/RuleCase.java index 9c0a856..bb82ff2 100755 --- a/src/main/java/bjc/rgens/parser/RuleCase.java +++ b/src/main/java/bjc/rgens/parser/RuleCase.java @@ -13,7 +13,7 @@ import bjc.utils.funcdata.IList; * * @author EVE */ -public class RuleCase { +public abstract class RuleCase { /** * The possible types of a case. * @@ -25,7 +25,7 @@ public class RuleCase { /** A case that doesn't insert spaces. */ SPACEFLATTEN, /** A case that applies a regex after generation. */ - REGEX + REGEX; } /** The type of this case. */ @@ -75,6 +75,8 @@ public class RuleCase { elementList = elements; } + public abstract void generate(GenerationState state); + /** * Get the element list value of this type. * -- cgit v1.2.3