summaryrefslogtreecommitdiff
path: root/src/main/java/bjc/rgens/parser/RuleCase.java
diff options
context:
space:
mode:
authorBenjamin J. Culkin <bjculkin@mix.wvu.edu>2018-05-29 19:44:40 -0300
committerBenjamin J. Culkin <bjculkin@mix.wvu.edu>2018-05-29 19:44:40 -0300
commitc524f46dbd6a460b7374690244888a001023d3af (patch)
tree8dff50b09354027879fe9b3c74c4dfc8274f25c6 /src/main/java/bjc/rgens/parser/RuleCase.java
parente7c2ce4ba9bd684a6722baf9ce58e91dfacc8eb3 (diff)
Refactor to split RuleCase
RuleCase now handles its own generation.
Diffstat (limited to 'src/main/java/bjc/rgens/parser/RuleCase.java')
-rwxr-xr-xsrc/main/java/bjc/rgens/parser/RuleCase.java6
1 files changed, 4 insertions, 2 deletions
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.
*