From a455800bc703bec7f90eaf9032d3dfba7b981e12 Mon Sep 17 00:00:00 2001 From: Morten Linderud Date: Mon, 24 Jun 2013 02:39:46 +0200 Subject: [PATCH] added break and continue --- hy/compiler.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hy/compiler.py b/hy/compiler.py index 2e63ec2..2ced07c 100644 --- a/hy/compiler.py +++ b/hy/compiler.py @@ -959,6 +959,20 @@ class HyASTCompiler(object): return ret + @builds("break") + def compile_break_expression(self, expr): + ret = ast.Break(lineno=e.start_line, + col_offset=e.start_column) + + return ret + + @builds("continue") + def compile_continue_expression(self, expr): + ret = ast.Continue(lineno=e.start_line, + col_offset=e.start_column) + + return ret + @builds("assert") @checkargs(1) def compile_assert_expression(self, expr):