diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-07-28 16:38:59 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-07-28 16:38:59 -0400 |
| commit | d80f404865656b6d1a8faf41cecdd61343adcd0b (patch) | |
| tree | a00a33e6e6cf2c7e568919e628828da848231027 /dice-lang/src/main/java/bjc/dicelang/ast/DiceASTEvaluator.java | |
| parent | f62abec2577d3745475581a19eff71dbb8c0494e (diff) | |
Fixed an issue with instantiating lazy values.
Also, work on language impl. notes
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.java | 4 |
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); }); |
