]> git.lizzy.rs Git - metalua.git/commitdiff
fixes in the weaver sample
authorunknown <Fabien@.(none)>
Wed, 21 Jan 2009 09:34:58 +0000 (10:34 +0100)
committerunknown <Fabien@.(none)>
Wed, 21 Jan 2009 09:34:58 +0000 (10:34 +0100)
src/samples/weaver.mlua

index 8a000370f71ce5809c9eb2b0ea32e32b21625cf3..202d00326311e335c4745d394695256f236f1e5d 100644 (file)
@@ -1,5 +1,5 @@
-require 'mlc'
-require 'walk'
+require 'metalua.mlc'
+require 'metalua.walk'
 
 function weave_ast (src, ast, name)
 
@@ -23,7 +23,8 @@ function weave_ast (src, ast, name)
    -------------------------------------------------------------------
    function node.down(ast, parent)
       if not ast.lineinfo then 
-         weaveable [ast], weaveable [parent] = false, false
+         weaveable [ast] = false, false
+         if parent then weaveable [parent] = false end
       else
          weaveable [ast] = true
       end