From e44bdc6a2a0cf624b08046ecc7e5c5d5d9d2d66c Mon Sep 17 00:00:00 2001 From: _ov4 Date: Fri, 16 Oct 2026 13:21:05 +0000 Subject: fix(compiler): correct CIE semantics and diagnostic locations Use standard WHILE headers and default-public class fields, resolve pseudocode identifiers without case sensitivity, and check signed i64 literal boundaries before conversion. Preserve source locations across recursive emission and function diagnostics. Add 22 regression cases and update compiler examples and documentation. Validated all 69 CTest entries with the original Linux Actions seed and verified the release package's embedded, native and IR output paths. --- tests/i/loops/notes.md | 2 +- tests/i/loops/program.cps | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/i/loops') diff --git a/tests/i/loops/notes.md b/tests/i/loops/notes.md index 6979d92..bdd322a 100644 --- a/tests/i/loops/notes.md +++ b/tests/i/loops/notes.md @@ -6,4 +6,4 @@ Basis: CIE pp. 20-21. Trace: FOR contributions are 0, 2, and 3+1-1=3. WHILE contributes 0+1+2=3. REPEAT contributes 10 once, then counts to 3. Total=18. -The project requires DO after WHILE; this fixture uses that spelling to exercise runtime semantics. The separate standard-while fixture tests the CIE spelling. +WHILE headers use the standard CIE spelling without DO. The separate standard-while fixture also checks this syntax. diff --git a/tests/i/loops/program.cps b/tests/i/loops/program.cps index a858e6c..d30b463 100644 --- a/tests/i/loops/program.cps +++ b/tests/i/loops/program.cps @@ -10,11 +10,11 @@ NEXT I FOR I <- 3 TO -1 STEP -2 Total <- Total + I NEXT I -WHILE FALSE DO +WHILE FALSE Total <- Total + 1000 ENDWHILE I <- 0 -WHILE I < 3 DO +WHILE I < 3 Total <- Total + I I <- I + 1 ENDWHILE -- cgit v1.3.1-4-g156e