Add support for the continue statement
Add error check for a break statement that's not inside a loop. (We just
generated bad code before. Oops!)
diff --git a/libacc/tests/test.py b/libacc/tests/test.py
index 6e0899c..d93af46 100644
--- a/libacc/tests/test.py
+++ b/libacc/tests/test.py
@@ -187,6 +187,10 @@
self.compileCheck(["-R", "data/returnval-ansi.c"],
"Executing compiled code:\nresult: 42\n")
+ def testContinue(self):
+ self.compileCheck(["-R", "data/continue.c"],
+ "Executing compiled code:\nresult: 400\n")
+
def testStringLiteralConcatenation(self):
self.compileCheck(["-R", "data/testStringConcat.c"],
"Executing compiled code:\nresult: 13\n", "Hello, world\n")