]> git.lizzy.rs Git - metalua.git/commitdiff
Enable `Dots nodes to be processed as identifiers
authorKévin KIN-FOO <kkin-foo@sierrawireless.com>
Fri, 25 Jun 2010 13:45:23 +0000 (15:45 +0200)
committerKevin KIN-FOO <kkinfoo@sierrawireless.com>
Thu, 19 May 2011 09:33:45 +0000 (11:33 +0200)
src/lib/metalua/walk/bindings.mlua

index 32b41a77905cf4e9160aa92519d50cd1e1ea47a4..3827507fa81953ca6fe4569ffb165079b3ecf093 100644 (file)
@@ -12,6 +12,7 @@ function bindings(ast)
    -- * ast: statement or expr carrying this id, on of:
    --        Local, Localrec, Forin, Fornum, Function.
    function cfg.binder (id, ast)
+      if id.tag ~= 'Id' then return end
       local id_name = id[1]
       -- Reference in scope, so that the binding statement can be retrieved:
       scope.current[id_name] = ast
@@ -38,4 +39,5 @@ function bindings(ast)
 
    walk.guess (cfg, ast)
    return binders, unbound
-end
\ No newline at end of file
+end
+