summaryrefslogtreecommitdiff
path: root/dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java
diff options
context:
space:
mode:
authorEVE <EVE@EVE-PC>2017-03-14 12:08:11 -0400
committerEVE <EVE@EVE-PC>2017-03-14 12:08:11 -0400
commit635d3150e3e85c01b777ff165e21fa8965d58440 (patch)
tree3389128f83a5a79f8d0eec0a0e19f54b9d117b66 /dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java
parente59e2a97773f93bdd25bd4680809c10699f0feb3 (diff)
Cleanup
Diffstat (limited to 'dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java')
-rw-r--r--dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java20
1 files changed, 9 insertions, 11 deletions
diff --git a/dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java b/dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java
index cce31a2..14dbc42 100644
--- a/dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java
+++ b/dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java
@@ -5,7 +5,7 @@ import java.util.Map;
/**
* A variable expression that represents binding a variable to a name in an
* enviroment
- *
+ *
* @author ben
*
*/
@@ -23,7 +23,7 @@ public class BindingDiceExpression implements IDiceExpression {
/**
* Create a new dice expression binder from two expressions and an
* enviroment
- *
+ *
* @param left
* The left side expression to get a name from. Must be a
* ReferenceDiceExpression
@@ -34,12 +34,10 @@ public class BindingDiceExpression implements IDiceExpression {
*/
public BindingDiceExpression(IDiceExpression left, IDiceExpression right,
Map<String, IDiceExpression> enviroment) {
- if (!(left instanceof ReferenceDiceExpression)) {
- throw new UnsupportedOperationException(
- "Error: Binding an expression to something that is not a variable reference,"
- + " or array thereof. is unsupported."
- + " Problematic expression is " + left);
- }
+ if(!(left instanceof ReferenceDiceExpression)) throw new UnsupportedOperationException(
+ "Error: Binding an expression to something that is not a variable reference,"
+ + " or array thereof. is unsupported." + " Problematic expression is "
+ + left);
String varName = ((ReferenceDiceExpression) left).getName();
@@ -48,7 +46,7 @@ public class BindingDiceExpression implements IDiceExpression {
/**
* Create a new dice expression binder
- *
+ *
* @param name
* The name of the variable to bind
* @param expression
@@ -69,7 +67,7 @@ public class BindingDiceExpression implements IDiceExpression {
/*
* (non-Javadoc)
- *
+ *
* @see bjc.utils.dice.IDiceExpression#roll()
*/
@Override
@@ -79,7 +77,7 @@ public class BindingDiceExpression implements IDiceExpression {
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#toString()
*/
@Override