exceptions

This commit is contained in:
Paul Tagliamonte 2012-12-22 21:23:39 -05:00
parent 58e13d40ae
commit c953692816

View File

@ -17,6 +17,10 @@ def _ast_print(node, children, obj):
return ast.Print(dest=None, values=children, nl=True) return ast.Print(dest=None, values=children, nl=True)
def _ast_raise(node, children, obj):
return ast.Raise(type=children[0])
def _ast_binop(node, children, obj): def _ast_binop(node, children, obj):
""" Handle basic Binary ops """ """ Handle basic Binary ops """
# operator = Add | Sub | Mult | Div | Mod | Pow | LShift # operator = Add | Sub | Mult | Div | Mod | Pow | LShift
@ -94,6 +98,7 @@ special_cases = {
"if": _ast_if, "if": _ast_if,
"return": _ast_return, "return": _ast_return,
"do": _ast_do, "do": _ast_do,
"raise": _ast_raise,
} }