X-Git-Url: http://nitlanguage.org diff --git a/src/nitlight.nit b/src/nitlight.nit index cc35b10..9a7b050 100644 --- a/src/nitlight.nit +++ b/src/nitlight.nit @@ -19,9 +19,6 @@ import highlight var toolcontext = new ToolContext -# Disable `cached` because it causes issues when printing transformed AST. FIXME -toolcontext.cached_phase.disabled = true - # Try to colorize, even if programs are non valid toolcontext.keep_going = true @@ -41,7 +38,7 @@ var modelbuilder = new ModelBuilder(model, toolcontext) var args = toolcontext.option_context.rest -var mmodules = modelbuilder.parse(args) +var mmodules = modelbuilder.parse_full(args) modelbuilder.run_phases if opt_full.value then mmodules = model.mmodules @@ -67,7 +64,8 @@ for mm in mmodules do if opt_last_line.value != 0 then v.last_line = opt_last_line.value if opt_ast.value then v.with_ast = true var page = null - var m = modelbuilder.mmodule2nmodule[mm] + var m = modelbuilder.mmodule2node(mm) + assert m != null if not opt_fragment.value then page = new HTMLTag("html") page.add_raw_html """ @@ -123,7 +121,7 @@ if dir != null then var v = new HighlightVisitor toolcontext.info("write {dir}/style.css", 1) - var f = new OFStream.open("{dir}/style.css") + var f = new FileWriter.open("{dir}/style.css") f.write v.css_content f.close end