Commit 20578e6d authored by Tom Niget's avatar Tom Niget

Add placeholder support for raise

parent f615b62a
......@@ -113,6 +113,11 @@ class FunctionVisitor(BlockVisitor):
#yield from self.visit(handler)
pass
# todo
def visit_Raise(self, node: ast.Raise) -> Iterable[str]:
yield "// raise"
# TODO
def visit_FunctionDef(self, node: ast.FunctionDef) -> Iterable[str]:
yield "auto"
yield self.fix_name(node.name)
......
......@@ -330,4 +330,10 @@ class ScoperBlockVisitor(ScoperVisitor):
else_visitor = ScoperBlockVisitor(else_scope, self.root_decls)
else_visitor.visit_block(node.orelse)
if node.finalbody:
raise NotImplementedError(node.finalbody)
\ No newline at end of file
raise NotImplementedError(node.finalbody)
def visit_Raise(self, node: ast.Raise):
if node.exc:
self.expr().visit(node.exc)
if node.cause:
self.expr().visit(node.cause)
\ No newline at end of file
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