From 3f74e1e25fd572adab34e53eb90edcf49404fbe5 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Tue, 11 Apr 2017 21:57:37 -0400 Subject: Cleanup --- .../bjc/pratt/commands/BlockNonInitialCommand.java | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'JPratt/src/main/java/bjc/pratt/commands/BlockNonInitialCommand.java') diff --git a/JPratt/src/main/java/bjc/pratt/commands/BlockNonInitialCommand.java b/JPratt/src/main/java/bjc/pratt/commands/BlockNonInitialCommand.java index 9a5ffc9..c361c73 100644 --- a/JPratt/src/main/java/bjc/pratt/commands/BlockNonInitialCommand.java +++ b/JPratt/src/main/java/bjc/pratt/commands/BlockNonInitialCommand.java @@ -10,42 +10,43 @@ import bjc.utils.parserutils.ParserException; /** * A non-initial command that delegates all of the work to a {@link ParseBlock} - * + * * @author bjculkin * * @param * The token key type. - * + * * @param * The token value type. - * + * * @param * The parser state type. */ public class BlockNonInitialCommand extends NonInitialCommand { - private ParseBlock innr; + private final ParseBlock innr; - private int lftBind; - private int nxtBind; + private final int lftBind; + private final int nxtBind; - private Token trm; + private final Token trm; /** * Create a new non-initial command that delegates to a parse block. - * + * * @param inner * The parse block to delegate to. - * + * * @param leftBind * The left binding power (precedence). - * + * * @param rightBind * The right binding power (associativity control). - * + * * @param term * The token to use as the node in the AST. */ - public BlockNonInitialCommand(ParseBlock inner, int leftBind, int rightBind, Token term) { + public BlockNonInitialCommand(final ParseBlock inner, final int leftBind, final int rightBind, + final Token term) { innr = inner; lftBind = leftBind; @@ -55,9 +56,9 @@ public class BlockNonInitialCommand extends NonInitialCommand } @Override - public ITree> denote(ITree> operand, Token operator, ParserContext ctx) - throws ParserException { - ITree> expression = innr.parse(ctx); + public ITree> denote(final ITree> operand, final Token operator, + final ParserContext ctx) throws ParserException { + final ITree> expression = innr.parse(ctx); return new Tree<>(trm, expression); } -- cgit v1.2.3