Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
be more specific about compilation
  • Loading branch information
Stevan Little committed May 2, 2013
1 parent be295ba commit b6168d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Expand Up @@ -9,10 +9,10 @@ object CompilationUnits {

def apply (i: Interpreter, r: MoeRuntime): PartialFunction[(MoeEnvironment, AST), MoeObject] = {
case (env, CompilationUnitNode(body)) => i.eval(r, env, body)
case (env, ScopeNode(body)) => i.eval(r, new MoeEnvironment(Some(env)), body)
case (env, ScopeNode(body)) => i.compile_and_evaluate(new MoeEnvironment(Some(env)), body)
case (env, StatementsNode(nodes)) => {
nodes.foldLeft[MoeObject](r.NativeObjects.getUndef)(
(_, node) => i.eval(r, env, node)
(_, node) => i.compile_and_evaluate(env, node)
)
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/main/scala/org/moe/interpreter/guts/Statements.scala
Expand Up @@ -28,8 +28,7 @@ object Statements {
r.NativeObjects.getStr(path.toString)
)

val result = i.eval(
r,
val result = i.compile_and_evaluate(
env,
MoeParser.parseFromEntry(Source.fromFile(path).mkString)
)
Expand Down

0 comments on commit b6168d5

Please sign in to comment.