diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-16 13:21:05 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-16 13:21:05 +0000 |
| commit | e44bdc6a2a0cf624b08046ecc7e5c5d5d9d2d66c (patch) | |
| tree | f5276cc0dd2f34e4d30a58f80223912265a1c5a0 /tests/i/identifier-domains/program.cps | |
| parent | e1e789ac0249149a4aa1671f5f9260d488cb617a (diff) | |
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.
Diffstat (limited to 'tests/i/identifier-domains/program.cps')
| -rw-r--r-- | tests/i/identifier-domains/program.cps | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/i/identifier-domains/program.cps b/tests/i/identifier-domains/program.cps new file mode 100644 index 0000000..d1b684b --- /dev/null +++ b/tests/i/identifier-domains/program.cps @@ -0,0 +1,43 @@ +TYPE Node + DECLARE Value : INTEGER +ENDTYPE +TYPE Link = ^Node +TYPE Season = (Spring, Summer) +TYPE Signed = C_TYPE("int") +CLASS Box + Value : INTEGER + PUBLIC Other : INTEGER + PRIVATE Hidden : INTEGER +ENDCLASS +CONSTANT Limit = 3 +DECLARE Item : nODE +DECLARE Ptr : lINK +DECLARE Mode : sEASON +DECLARE Crate : bOX +DECLARE Items : ARRAY[1:2] OF INTEGER +DECLARE Index : INTEGER +item.value <- limit +pTR <- ^ITEM +ptr^.vALUE <- 7 +mode <- sUMMER +crate.value <- 8 +CRATE.other <- 9 +CALL cHANGE(iTEMS) +FOR Index <- 1 TO 2 + OUTPUT items[index] +NEXT iNDEX +OUTPUT rEADnODE(ITEM), ":", MODE = summer +OUTPUT crate.VALUE, ":", crate.OTHER +OUTPUT length("MiXeD"), ":", (sIGNED)3 +IF TRUE THEN + CONSTANT lIMIT = 5 + OUTPUT LIMIT +ENDIF +OUTPUT Limit +PROCEDURE Change(BYREF Values : ARRAY OF INTEGER) + vALUES[1] <- 4 + VALUES[2] <- 6 +ENDPROCEDURE +FUNCTION ReadNode(Value : NODE) RETURNS INTEGER + RETURN vALUE.Value +ENDFUNCTION |
