highlight: remove the modelbuilder attribute
authorJean Privat <jean@pryen.org>
Fri, 23 Aug 2013 18:43:36 +0000 (14:43 -0400)
committerJean Privat <jean@pryen.org>
Fri, 23 Aug 2013 18:43:36 +0000 (14:43 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/highlight.nit
src/nitlight.nit

index 447ef4d..78d7a23 100644 (file)
@@ -54,11 +54,8 @@ class HighlightVisitor
        # Used to print parts of the source betwen tokens of the AST
        private var pos = 0
 
-       var modelbuilder: ModelBuilder
-
-       init(modelbuilder: ModelBuilder)
+       init
        do
-               self.modelbuilder = modelbuilder
                html.add_class("nitcode")
                token_head = html
                prod_head = html
index ce3bf51..a5e492e 100644 (file)
@@ -53,7 +53,7 @@ end
 for mm in mmodules do
        if dir != null then toolcontext.info("write {dir}/{mm.name}.html", 1)
 
-       var v = new HighlightVisitor(modelbuilder)
+       var v = new HighlightVisitor
        if opt_ast.value then v.with_ast = true
        var page = null
        if not opt_fragment.value then
@@ -106,7 +106,7 @@ if dir != null then
        page.add_raw_html "</li></body>"
        page.save("{dir}/index.html")
 
-       var v = new HighlightVisitor(modelbuilder)
+       var v = new HighlightVisitor
        toolcontext.info("write {dir}/style.css", 1)
        var f = new OFStream.open("{dir}/style.css")
        f.write v.css_content