"""
self.run_cases_test(input, output)
+ def test_no_escaping_calls_in_branching_macros(self):
+
+ input = """
+ inst(OP, ( -- )) {
+ DEOPT_IF(escaping_call());
+ }
+ """
+ with self.assertRaises(SyntaxError):
+ self.run_cases_test(input, "")
+
+ input = """
+ inst(OP, ( -- )) {
+ EXIT_IF(escaping_call());
+ }
+ """
+ with self.assertRaises(SyntaxError):
+ self.run_cases_test(input, "")
+
+ input = """
+ inst(OP, ( -- )) {
+ ERROR_IF(escaping_call(), error);
+ }
+ """
+ with self.assertRaises(SyntaxError):
+ self.run_cases_test(input, "")
class TestGeneratedAbstractCases(unittest.TestCase):
def setUp(self) -> None:
if tkn.kind == "IF":
next(tkn_iter)
in_if = 1
- if tkn.kind == "IDENTIFIER" and tkn.text in ("DEOPT_IF", "ERROR_IF"):
+ if tkn.kind == "IDENTIFIER" and tkn.text in ("DEOPT_IF", "ERROR_IF", "EXIT_IF"):
next(tkn_iter)
in_if = 1
elif tkn.kind == "LPAREN" and in_if: