blaise/tests
Graeme Geldenhuys 2f7f551925 feat(rtl): sysutils.pas (Exception class) and strutils.pas (empty stub)
Steps 5 and 6 of v0.3.0 multi-file self-hosting:

- rtl/src/main/pascal/sysutils.pas: Exception base class with
  Create(AMessage: string) constructor and Message property.
- rtl/src/main/pascal/strutils.pas: empty stub unit satisfying
  the unit loader for `uses StrUtils` without any API calls.

To parse these RTL units, the compiler now recognises `constructor`
and `destructor` as reserved keywords (uLexer.pas, uParser.pas),
treating both as aliases for `procedure` in method declarations.
The constructor nature of a call is determined at the call site, not
from the declaration keyword — matching the existing codegen model.

Tests (cp.test.exceptions.pas):
  - TestSemantic_ExceptionSubclass_CreateAndMessage_OK
  - TestCodegen_ExceptionSubclass_CtorCallWithMessage

Hand source (tests/blaise-compiler.pas) synced with all changes.
Fixpoint verified (stage-2 IR == stage-3 IR).

docs/language-rationale.adoc: Constructor/Destructor Keywords section.
docs/grammar.ebnf: CONSTRUCTOR/DESTRUCTOR terminals; MethodDecl updated.
docs/future-improvements.adoc: Stream I/O, macOS debugging, and
  multi-line string literals sections (cleaned up from draft notes).
2026-04-29 14:43:42 +01:00
..
integration Add Phase 2: record/class types, ARC strings, RTL stubs, and grammar doc 2026-04-20 19:04:12 +01:00
blaise-compiler.pas feat(rtl): sysutils.pas (Exception class) and strutils.pas (empty stub) 2026-04-29 14:43:42 +01:00
phase2_milestone.pas Collapse Write+WriteLn pairs into multi-arg WriteLn in milestone tests 2026-04-22 23:19:55 +01:00
phase3_milestone.pas Add TObjectList and TStringList to RTL; fix string ARC via typed pointers 2026-04-23 12:32:59 +01:00