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/text-files/notes.md | 2 +- tests/i/text-files/program.cps | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/i/text-files') diff --git a/tests/i/text-files/notes.md b/tests/i/text-files/notes.md index cc62aea..1b2ecad 100644 --- a/tests/i/text-files/notes.md +++ b/tests/i/text-files/notes.md @@ -6,4 +6,4 @@ Basis: CIE p. 25; CRLF input handling follows project text-file semantics. Trace: Input contains three lines, including an empty line and a last line without terminator. Empty-file EOF is true. WRITE replaces old contents; APPEND adds last after the existing blank line. -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/text-files/program.cps b/tests/i/text-files/program.cps index 1d6d5bb..42632fd 100644 --- a/tests/i/text-files/program.cps +++ b/tests/i/text-files/program.cps @@ -2,7 +2,7 @@ DECLARE Line : STRING DECLARE Count : INTEGER OPENFILE "input.txt" FOR READ Count <- 0 -WHILE NOT EOF("input.txt") DO +WHILE NOT EOF("input.txt") READFILE "input.txt", Line OUTPUT "[", Line, "]" Count <- Count + 1 @@ -19,7 +19,7 @@ OPENFILE "result.txt" FOR APPEND WRITEFILE "result.txt", "last" CLOSEFILE "result.txt" OPENFILE "result.txt" FOR READ -WHILE NOT EOF("result.txt") DO +WHILE NOT EOF("result.txt") READFILE "result.txt", Line OUTPUT "[", Line, "]" ENDWHILE -- cgit v1.3.1-4-g156e