summaryrefslogtreecommitdiff
path: root/JPratt/src/main/java/bjc/pratt/commands/impls/TernaryCommand.java
diff options
context:
space:
mode:
authorbjculkin <bjculkin@mix.wvu.edu>2018-02-15 15:25:09 -0500
committerbjculkin <bjculkin@mix.wvu.edu>2018-02-15 15:25:09 -0500
commit5028ad9a1faad0e363d017f18363e8062ba59871 (patch)
tree80df30dc24a2cd79abf7533b98fcfcd28b1f4fee /JPratt/src/main/java/bjc/pratt/commands/impls/TernaryCommand.java
parent1112bb1b44bb3aabe439a2b9f88a51a9c1e435de (diff)
Formatting and things
Diffstat (limited to 'JPratt/src/main/java/bjc/pratt/commands/impls/TernaryCommand.java')
-rw-r--r--JPratt/src/main/java/bjc/pratt/commands/impls/TernaryCommand.java21
1 files changed, 10 insertions, 11 deletions
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 <K>
- * The key type of the tokens.
+ * The key type of the tokens.
*
* @param <V>
- * The value type of the tokens.
+ * The value type of the tokens.
*
* @param <C>
- * The state type of the parser.
+ * The state type of the parser.
*/
public class TernaryCommand<K, V, C> extends BinaryPostCommand<K, V, C> {
private final ParseBlock<K, V, C> innerBlck;
@@ -33,25 +33,24 @@ public class TernaryCommand<K, V, C> extends BinaryPostCommand<K, V, C> {
* 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<K, V, C> innerBlock, final Token<K, V> 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<K, V, C> extends BinaryPostCommand<K, V, C> {
@Override
public int nextBinding() {
- if (nonassoc) return leftBinding() - 1;
+ if(nonassoc) return leftBinding() - 1;
return leftBinding();
}