From 56f07e9a3aaa873fe385d224f088f048dbafa8f7 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Mon, 10 Apr 2017 16:49:54 -0400 Subject: Cleanup --- .../java/bjc/pratt/commands/PreTernaryCommand.java | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'JPratt/src/main/java/bjc/pratt/commands/PreTernaryCommand.java') diff --git a/JPratt/src/main/java/bjc/pratt/commands/PreTernaryCommand.java b/JPratt/src/main/java/bjc/pratt/commands/PreTernaryCommand.java index 072c58c..d8304e2 100644 --- a/JPratt/src/main/java/bjc/pratt/commands/PreTernaryCommand.java +++ b/JPratt/src/main/java/bjc/pratt/commands/PreTernaryCommand.java @@ -9,43 +9,43 @@ import bjc.utils.parserutils.ParserException; /** * A prefix ternary operator, like an if/then/else group. - * + * * @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 PreTernaryCommand extends AbstractInitialCommand { - private Token trm; + private final Token trm; - private ParseBlock condBlock; + private final ParseBlock condBlock; - private ParseBlock opblock1; - private ParseBlock opblock2; + private final ParseBlock opblock1; + private final ParseBlock opblock2; /** * Create a new ternary statement. - * + * * @param cond * The block for handling the condition. - * + * * @param op1 * The block for handling the first operator. - * + * * @param op2 * The block for handling the second operator. - * + * * @param term * The token to use as the node for the AST. */ - public PreTernaryCommand(ParseBlock cond, ParseBlock op1, ParseBlock op2, - Token term) { + public PreTernaryCommand(final ParseBlock cond, final ParseBlock op1, + final ParseBlock op2, final Token term) { super(); if (cond == null) @@ -62,13 +62,13 @@ public class PreTernaryCommand extends AbstractInitialCommand } @Override - protected ITree> intNullDenotation(Token operator, ParserContext ctx) + protected ITree> intNullDenotation(final Token operator, final ParserContext ctx) throws ParserException { - ITree> cond = condBlock.parse(ctx); + final ITree> cond = condBlock.parse(ctx); - ITree> op1 = opblock1.parse(ctx); + final ITree> op1 = opblock1.parse(ctx); - ITree> op2 = opblock2.parse(ctx); + final ITree> op2 = opblock2.parse(ctx); return new Tree<>(trm, cond, op1, op2); } -- cgit v1.2.3