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 --- JPratt/src/main/java/bjc/pratt/commands/InitialCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'JPratt/src/main/java/bjc/pratt/commands/InitialCommand.java') diff --git a/JPratt/src/main/java/bjc/pratt/commands/InitialCommand.java b/JPratt/src/main/java/bjc/pratt/commands/InitialCommand.java index 3a2a8ff..ba544b4 100644 --- a/JPratt/src/main/java/bjc/pratt/commands/InitialCommand.java +++ b/JPratt/src/main/java/bjc/pratt/commands/InitialCommand.java @@ -31,10 +31,10 @@ public interface InitialCommand { * @param ctx * The context for the command. * - * @return The tree for this command. + * @return The result of executing the command. * * @throws ParserException * If something goes wrong during parsing. */ - Tree> denote(Token operator, ParserContext ctx) throws ParserException; + CommandResult denote(Token operator, ParserContext ctx) throws ParserException; } -- cgit v1.2.3