Commit 28dc8d44 authored by Tom Niget's avatar Tom Niget

Pass proper module name to transpile()

parent bdccf8df
...@@ -69,7 +69,7 @@ def main(): ...@@ -69,7 +69,7 @@ def main():
from transpiler import transpile from transpiler import transpile
from transpiler.format import format_code from transpiler.format import format_code
raw_cpp = transpile(code, path.name, path) raw_cpp = transpile(code, path.stem, path)
formatted = format_code(raw_cpp) formatted = format_code(raw_cpp)
output_name = args.output or path.with_suffix('.cpp') output_name = args.output or path.with_suffix('.cpp')
......
...@@ -76,7 +76,7 @@ def run_test(path, quiet=True): ...@@ -76,7 +76,7 @@ def run_test(path, quiet=True):
compile = "# nocompile" not in code compile = "# nocompile" not in code
extension = "# extension" in code extension = "# extension" in code
try: try:
res = format_code(transpile(code, path.name, path)) res = format_code(transpile(code, path.stem, path))
except: except:
if not quiet: if not quiet:
raise raise
......
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