]> git.lizzy.rs Git - metalua.git/blobdiff - src/lib/metalua/walk/bindings.mlua
Enable `Dots nodes to be processed as identifiers
[metalua.git] / 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
+