From 5028ad9a1faad0e363d017f18363e8062ba59871 Mon Sep 17 00:00:00 2001 From: bjculkin Date: Thu, 15 Feb 2018 15:25:09 -0500 Subject: Formatting and things --- .../bjc/pratt/commands/impls/TernaryCommand.java | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'JPratt/src/main/java/bjc/pratt/commands/impls/TernaryCommand.java') diff --git a/JPratt/src/main/java/bjc/pratt/commands/impls/TernaryCommand.java b/JPratt/src/main/java/bjc/pratt/commands/impls/TernaryCommand.java index 92355c0..988869e 100644 --- a/JPratt/src/main/java/bjc/pratt/commands/impls/TernaryCommand.java +++ b/JPratt/src/main/java/bjc/pratt/commands/impls/TernaryCommand.java @@ -14,13 +14,13 @@ import bjc.utils.parserutils.ParserException; * @author bjculkin * * @param - * The key type of the tokens. + * The key type of the tokens. * * @param - * The value type of the tokens. + * The value type of the tokens. * * @param - * The state type of the parser. + * The state type of the parser. */ public class TernaryCommand extends BinaryPostCommand { private final ParseBlock innerBlck; @@ -33,25 +33,24 @@ public class TernaryCommand extends BinaryPostCommand { * Create a new ternary command. * * @param precedence - * The precedence of this operator. + * The precedence of this operator. * * @param innerBlock - * The representation of the inner block of the - * expression. + * The representation of the inner block of the expression. * * @param marker - * The token to use as the root of the AST node. + * The token to use as the root of the AST node. * * @param isNonassoc - * Whether or not the conditional is associative. + * Whether or not the conditional is associative. */ public TernaryCommand(final int precedence, final ParseBlock innerBlock, final Token marker, final boolean isNonassoc) { super(precedence); - if (innerBlock == null) + if(innerBlock == null) throw new NullPointerException("Inner block must not be null"); - else if (marker == null) throw new NullPointerException("Marker must not be null"); + else if(marker == null) throw new NullPointerException("Marker must not be null"); innerBlck = innerBlock; mark = marker; @@ -71,7 +70,7 @@ public class TernaryCommand extends BinaryPostCommand { @Override public int nextBinding() { - if (nonassoc) return leftBinding() - 1; + if(nonassoc) return leftBinding() - 1; return leftBinding(); } -- cgit v1.2.3