summaryrefslogtreecommitdiff
path: root/dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java
diff options
context:
space:
mode:
authorEVE <EVE@EVE-PC>2017-03-13 16:41:45 -0400
committerEVE <EVE@EVE-PC>2017-03-13 16:41:45 -0400
commit01136c6796e21f023713e026674576d8e623462d (patch)
treee77886fe0e0adaf3c0430fba9ce248ef83f74fe4 /dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java
parent870d769cfc152171d27b2331a7c590d0b307ad48 (diff)
Formatting
Diffstat (limited to 'dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java')
-rw-r--r--dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java34
1 files changed, 15 insertions, 19 deletions
diff --git a/dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java b/dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java
index 019f5ee..cce31a2 100644
--- a/dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java
+++ b/dice-lang/src/bjc/dicelang/v1/BindingDiceExpression.java
@@ -13,33 +13,32 @@ public class BindingDiceExpression implements IDiceExpression {
/*
* The expression being bound to a name
*/
- private IDiceExpression expression;
+ private IDiceExpression expression;
/*
* The name to bind the expression to
*/
- private String name;
+ private String name;
/**
* 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
+ * The left side expression to get a name from. Must be a
+ * ReferenceDiceExpression
* @param right
- * The right side to bind to the name
+ * The right side to bind to the name
* @param enviroment
- * The enviroment to bind into
+ * The enviroment to bind into
*/
- public BindingDiceExpression(IDiceExpression left,
- IDiceExpression right,
+ 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);
+ + " or array thereof. is unsupported."
+ + " Problematic expression is " + left);
}
String varName = ((ReferenceDiceExpression) left).getName();
@@ -51,19 +50,17 @@ public class BindingDiceExpression implements IDiceExpression {
* Create a new dice expression binder
*
* @param name
- * The name of the variable to bind
+ * The name of the variable to bind
* @param expression
- * The expression to bind to the variable
+ * The expression to bind to the variable
* @param enviroment
- * The enviroment to bind it in
+ * The enviroment to bind it in
*/
- public BindingDiceExpression(String name, IDiceExpression expression,
- Map<String, IDiceExpression> enviroment) {
+ public BindingDiceExpression(String name, IDiceExpression expression, Map<String, IDiceExpression> enviroment) {
initialize(name, expression, enviroment);
}
- private void initialize(String name, IDiceExpression expr,
- Map<String, IDiceExpression> enviroment) {
+ private void initialize(String name, IDiceExpression expr, Map<String, IDiceExpression> enviroment) {
this.name = name;
this.expression = expr;
@@ -87,7 +84,6 @@ public class BindingDiceExpression implements IDiceExpression {
*/
@Override
public String toString() {
- return "assign[n=" + name + ", exp="
- + expression.toString() + "]";
+ return "assign[n=" + name + ", exp=" + expression.toString() + "]";
}
}