Commit e790ff68 authored by Tom Niget's avatar Tom Niget

Rename stdlib files to prevent naming conflict

parent e7cc8c2e
......@@ -57,6 +57,8 @@ def discover_module(path: Path, scope):
elif child.suffix == ".py":
mod_scope = PRELUDE.child(ScopeKind.GLOBAL)
StdlibVisitor(mod_scope).visit(ast.parse(child.read_text()))
if child.stem[-1] == "_":
child = child.with_name(child.stem[:-1])
scope.vars[child.stem] = make_mod_decl(child, mod_scope)
print(f"Visited {child}")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment