summaryrefslogtreecommitdiff
path: root/dice-lang/src/main/java/bjc/dicelang/ast/DiceASTEvaluator.java
diff options
context:
space:
mode:
Diffstat (limited to 'dice-lang/src/main/java/bjc/dicelang/ast/DiceASTEvaluator.java')
-rw-r--r--dice-lang/src/main/java/bjc/dicelang/ast/DiceASTEvaluator.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/dice-lang/src/main/java/bjc/dicelang/ast/DiceASTEvaluator.java b/dice-lang/src/main/java/bjc/dicelang/ast/DiceASTEvaluator.java
index 2ed7adf..cef2e19 100644
--- a/dice-lang/src/main/java/bjc/dicelang/ast/DiceASTEvaluator.java
+++ b/dice-lang/src/main/java/bjc/dicelang/ast/DiceASTEvaluator.java
@@ -42,7 +42,8 @@ public class DiceASTEvaluator {
return result;
}
- throw new UnsupportedOperationException(
+ // Return a DummyResult to handle lets properly
+ return new DummyResult(
"Attempted to deref unbound variable " + variableName);
}
@@ -88,6 +89,7 @@ public class DiceASTEvaluator {
DiceASTEvaluator::parseGroup);
operatorCollapsers.put(OperatorDiceNode.LET, (nodes) -> {
+ // @TODO Fix lets prematurely evaluating things
return parseLet(enviroment, nodes);
});