Merge branch 'master' into polymorphic_extern_classes
[nit.git] / src / nit.nit
index dc48db8..af02fa2 100644 (file)
 # A naive Nit interpreter
 module nit
 
-import naive_interpreter
-import debugger
-import debugger_socket
+import interpreter
+import frontend
 
 # Create a tool context to handle options and paths
 var toolcontext = new ToolContext
-toolcontext.tooldescription = "Usage: nit [OPTION]... <file.nit>...\nInterprets and debbugs Nit programs."
+toolcontext.tooldescription = "Usage: nit [OPTION]... <file.nit>...\nInterprets and debugs Nit programs."
 # Add an option "-o" to enable compatibilit with the tests.sh script
 var opt = new OptionString("compatibility (does noting)", "-o")
 toolcontext.option_context.add_option(opt)
@@ -35,7 +34,7 @@ toolcontext.process_options(args)
 # We need a model to collect stufs
 var model = new Model
 # An a model builder to parse files
-var modelbuilder = new ModelBuilder(model, toolcontext.as(not null))
+var modelbuilder = new ModelBuilder(model, toolcontext)
 
 var arguments = toolcontext.option_context.rest
 var progname = arguments.first
@@ -57,8 +56,8 @@ else
        mainmodule.set_imported_mmodules(mmodules)
 end
 
-var self_mm = mainmodule.as(not null)
-var self_args = arguments.as(not null)
+var self_mm = mainmodule
+var self_args = arguments
 
 if toolcontext.opt_debugger_autorun.value then
        modelbuilder.run_debugger_autorun(self_mm, self_args)