Commit 41659efd authored by Tom Niget's avatar Tom Niget

Support comments

parent 98dfba9a
......@@ -28,3 +28,12 @@ class ModuleVisitor(BlockVisitor):
yield from self.import_module(node.module)
for alias in node.names:
yield f"auto& {alias.asname or alias.name} = py_{node.module}::all.{alias.name};"
def visit_Expr(self, node: ast.Expr) -> Iterable[str]:
if isinstance(node.value, ast.Str):
if "\n" in node.value.s:
yield f"/*{node.value.s}*/"
else:
yield f"//{node.value.s}"
else:
raise NotImplementedError(node)
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