From b9d3a95ba1886508910b3e7f25c7f9b0f735600d Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Mon, 27 Mar 2017 23:28:42 -0400 Subject: Minor update --- .../pratt/commands/DenestingCommand.java | 30 ++++++++++++++++------ 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils') diff --git a/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/DenestingCommand.java b/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/DenestingCommand.java index d2d7829..01f92bb 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/DenestingCommand.java +++ b/BJC-Utils2/src/main/java/bjc/utils/parserutils/pratt/commands/DenestingCommand.java @@ -6,26 +6,40 @@ import bjc.utils.parserutils.pratt.InitialCommand; import bjc.utils.parserutils.pratt.ParserContext; import bjc.utils.parserutils.pratt.Token; -public class DenestingCommand extends AbstractInitialCommand { - private InitialCommand internal; +/** + * A command that denests a input tree. + * + * Useful for processing the result of passing a complex parse group to a + * command. + * + * @author bjculkin + * + * @param + * The key type of the tokens. + * + * @param + * The value type of the tokens. + * + * @param + * The state type of the parser. + * + */ +public class DenestingCommand extends AbstractInitialCommand { + private InitialCommand wrapped; /** * Create a new transforming initial command. * * @param internal * The initial command to delegate to. - * - * @param transform - * The transform to apply to the returned tree. */ public DenestingCommand(InitialCommand internal) { - super(); - this.internal = internal; + wrapped = internal; } @Override protected ITree> intNullDenotation(Token operator, ParserContext ctx) throws ParserException { - return internal.denote(operator, ctx).getChild(0); + return wrapped.denote(operator, ctx).getChild(0); } } \ No newline at end of file -- cgit v1.2.3