From cea3e47938322b97c318dea38dc0d649e196dc1b Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Tue, 16 Aug 2022 23:03:27 -0400 Subject: 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 --- .../main/java/bjc/pratt/commands/impls/DefaultNonInitialCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'JPratt/src/main/java/bjc/pratt/commands/impls/DefaultNonInitialCommand.java') diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/DefaultNonInitialCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/DefaultNonInitialCommand.java index 797473a..2ae9fb7 100644 --- a/JPratt/src/main/java/bjc/pratt/commands/impls/DefaultNonInitialCommand.java +++ b/JPratt/src/main/java/bjc/pratt/commands/impls/DefaultNonInitialCommand.java @@ -1,6 +1,7 @@ package bjc.pratt.commands.impls; import bjc.pratt.ParserContext; +import bjc.pratt.commands.CommandResult; import bjc.pratt.commands.NonInitialCommand; import bjc.pratt.tokens.Token; import bjc.data.Tree; @@ -21,7 +22,7 @@ import bjc.data.Tree; */ public class DefaultNonInitialCommand extends NonInitialCommand { @Override - public Tree> denote(final Tree> operand, final Token operator, + public CommandResult denote(final Tree> operand, final Token operator, final ParserContext ctx) { throw new UnsupportedOperationException("Default command has no left denotation"); } -- cgit v1.2.3