# A version of the naive Nit interpreter for PNaCl.
module pnacl_nit
-import interpreter::naive_interpreter
-import interpreter::debugger
+import nitc::interpreter::naive_interpreter
+import nitc::interpreter::debugger
import pnacl
-intrude import toolcontext
-intrude import loader
+intrude import nitc::toolcontext
+intrude import nitc::loader
intrude import core::file
# We redefine exit to start a new thread before killing the one that called exit.
redef fun module_absolute_path(path: String): String do return path
# We don't use paths as the interpreter, so we don't use location or lookpaths args (see the default implementation).
- redef fun search_module_in_paths(location: nullable Location, name: String, lookpaths: Collection[String]): nullable ModulePath
+ redef fun search_module_in_paths(location: nullable Location, name: String, lookpaths: Collection[String]): nullable MModule
do
var candidate: nullable String = null
var try_file = "{name}.nit"
end
end
if candidate == null then return null
- return identify_file(candidate)
+ return identify_module(candidate)
end
end