| 12345678910111213141516171819202122232425262728 |
- MODULE TExceptParse;
- (* M1 parser/AST regression: EXCEPT is accepted on procedure and module
- bodies, RETRY is accepted inside a handler, and an empty body with
- only a handler parses. Until M2, Lower deliberately rejects EXCEPT
- with 230 so no handler is silently ignored; the test is an
- expect_fail on "not supported yet". *)
- VAR ExitCode: INTEGER;
- PROCEDURE Set42;
- BEGIN
- ExitCode := 42
- EXCEPT
- ExitCode := 1;
- RETRY
- END Set42;
- PROCEDURE EmptyBody;
- EXCEPT
- ExitCode := 2
- END EmptyBody;
- BEGIN
- ExitCode := 0;
- Set42
- EXCEPT
- ExitCode := 3;
- RETRY
- END TExceptParse.
|