From 60b097696a707e6389b68023a2c1937f71130035 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Thu, 27 Oct 2016 22:12:00 -0400 Subject: Fixed annoying compile issue. Basically, I moved a class, and eclipse couldn't tell --- dice-lang/src/bjc/dicelang/ast/DiceASTInliner.java | 25 +++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'dice-lang/src/bjc/dicelang/ast/DiceASTInliner.java') 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); } /** -- cgit v1.2.3