All done. Here's what was added:
New Test Files
codegen/e2e_intrinsics_test.go — 13 tests
Transputer intrinsics (previously zero coverage):
- LONGPROD (basic + with carry)
- LONGDIV (basic + large roundtrip with LONGPROD)
- LONGSUM (basic + overflow)
- LONGDIFF (basic + borrow)
- NORMALISE (basic + zero)
- SHIFTRIGHT, SHIFTLEFT (basic + cross-word shift)
codegen/e2e_retypes_test.go — 6 tests
RETYPES bit reinterpretation (previously parser-only):
- float32→int (1.0, 0.0, -1.0)
- Same-name shadowing (VAL INT X RETYPES X :)
- float64→int pair (1.0, 0.0)
codegen/e2e_params_test.go — 6 tests
Proc parameter variants (previously zero coverage):
- RESULT qualifier (single + multiple)
- Fixed-size array params [2]INT
- Shared-type channel params CHAN OF INT input?, output!
- Shared-type int params VAL INT a, b
- VAL []BYTE param with string→[]byte wrapping
codegen/e2e_strings_test.go — 5 tests
String/print operations (previously zero e2e):
- VAL []BYTE s IS "hello": abbreviation
- print.string
- print.newline
- Combined string printing
- String with escape sequences
codegen/e2e_misc_test.go — 24 tests
Coverage for many smaller gaps:
- SKIP (standalone + in PAR)
- STOP (reached — verifies deadlock/non-zero exit)
- Modulo operator \ (basic + in expression)
- ALT with boolean guards (FALSE guard + TRUE guard)
- MOSTNEG/MOSTPOS for REAL32 and REAL64 (4 tests)
- Shorthand slice [arr FOR m]
- String→[]byte wrapping
- Go reserved word escaping (len, byte)
- Multi-line expressions (continuation + paren)
- Negative int literal, NOT, AND/OR
- Nested IF, WHILE loop, CASE multi-arm
- = / <> operators
- STOP in proc (compile-only check)
- Nested replicated SEQ
- Array slice assignment
- Function call in IF condition
- Recursive function
- Multi-line proc params
- go vet cleanness check
lexer/lexer_test2_test.go — 15 tests
Lexer-level coverage gaps:
- All 33+ keywords (previously only 11 tested)
- Paren depth suppression of INDENT/DEDENT
- Bracket depth suppression
- Continuation operator line continuation (+ AND)
- String literal tokenization
- String escape preservation
- Byte literal + escape
- Send/receive !/? tokens
- Ampersand & token
- Semicolon ; token
- Nested paren depth tracking
- Mixed paren/bracket depth
- Line/column tracking
Summary
| Area |
Before |
Added |
Total |
| Lexer tests |
9 |
15 |
24 |
| E2E tests |
~124 |
54 |
~178 |
| Total new tests |
|
69 |
|
All 69 new tests pass alongside all existing tests.