diff options
| author | Ben Culkin <scorpress@gmail.com> | 2022-08-16 23:03:27 -0400 |
|---|---|---|
| committer | Ben Culkin <scorpress@gmail.com> | 2022-08-16 23:03:27 -0400 |
| commit | cea3e47938322b97c318dea38dc0d649e196dc1b (patch) | |
| tree | 0ceef0bafbfed7aa5802e8fc526c0c98276f1fff /JPratt/src/main/java/bjc/pratt/commands/impls/DefaultInitialCommand.java | |
| parent | 4869146748ed51eb212935d2b971388fb9e73d37 (diff) | |
Refactor to add backtracking support
This probably doesn't help w/ error messages, but it enables some cool
ideas where syntax can be reused in cases where it would otherwise be
invalid
Diffstat (limited to 'JPratt/src/main/java/bjc/pratt/commands/impls/DefaultInitialCommand.java')
| -rw-r--r-- | JPratt/src/main/java/bjc/pratt/commands/impls/DefaultInitialCommand.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/DefaultInitialCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/DefaultInitialCommand.java index 296cb1c..2dfc576 100644 --- a/JPratt/src/main/java/bjc/pratt/commands/impls/DefaultInitialCommand.java +++ b/JPratt/src/main/java/bjc/pratt/commands/impls/DefaultInitialCommand.java @@ -1,6 +1,7 @@ package bjc.pratt.commands.impls; import bjc.pratt.ParserContext; +import bjc.pratt.commands.CommandResult; import bjc.pratt.commands.InitialCommand; import bjc.pratt.tokens.Token; import bjc.data.Tree; @@ -22,7 +23,7 @@ import bjc.utils.parserutils.ParserException; */ public class DefaultInitialCommand<K, V, C> implements InitialCommand<K, V, C> { @Override - public Tree<Token<K, V>> denote(final Token<K, V> operator, final ParserContext<K, V, C> ctx) + public CommandResult<K, V> denote(final Token<K, V> operator, final ParserContext<K, V, C> ctx) throws ParserException { throw new ParserException("Unexpected token " + operator); } |
