diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-10-27 22:12:00 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-10-27 22:12:47 -0400 |
| commit | 60b097696a707e6389b68023a2c1937f71130035 (patch) | |
| tree | 917c24288f060b2c765a710e9171a3f5d5ef4bb6 /dice-lang/src/bjc/dicelang/ast/DiceASTInliner.java | |
| parent | e7413128ff4e376997de6e94e4bea5eca14811ef (diff) | |
Fixed annoying compile issue.
Basically, I moved a class, and eclipse couldn't tell
Diffstat (limited to 'dice-lang/src/bjc/dicelang/ast/DiceASTInliner.java')
| -rw-r--r-- | dice-lang/src/bjc/dicelang/ast/DiceASTInliner.java | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/dice-lang/src/bjc/dicelang/ast/DiceASTInliner.java b/dice-lang/src/bjc/dicelang/ast/DiceASTInliner.java index 305c9af..3cba13c 100644 --- a/dice-lang/src/bjc/dicelang/ast/DiceASTInliner.java +++ b/dice-lang/src/bjc/dicelang/ast/DiceASTInliner.java @@ -1,10 +1,10 @@ package bjc.dicelang.ast; +import bjc.utils.data.ITree; import bjc.utils.funcdata.FunctionalList; import bjc.utils.funcdata.IList; import bjc.utils.funcdata.IMap; -import bjc.utils.funcdata.ITree; -import bjc.utils.funcdata.Tree; +import bjc.utils.data.Tree; import bjc.dicelang.ast.nodes.DiceASTType; import bjc.dicelang.ast.nodes.IDiceASTNode; @@ -58,19 +58,20 @@ public class DiceASTInliner { // Return the tree for the variable return enviroment.get(variableName); } - } else { - // You can't inline non-existent variables - if (!enviroment.containsKey(variableName)) { - throw new UnsupportedOperationException( - "Attempted to inline non-existant variable " - + variableName); - } - // Return the tree for the variable - return enviroment.get(variableName); + // We're not inlining this particular variable + return new Tree<>(node); + } + + // You can't inline non-existent variables + if (!enviroment.containsKey(variableName)) { + throw new UnsupportedOperationException( + "Attempted to inline non-existant variable " + + variableName); } - // return new Tree<>(node); + // Return the tree for the variable + return enviroment.get(variableName); } /** |
