Keep BASIC fixtures within the input line limit
All checks were successful
akbasic CI Build / cmake_build (push) Successful in 3m50s
akbasic CI Build / coverage (push) Successful in 4m4s
akbasic CI Build / sanitizers (push) Successful in 4m48s
akbasic CI Build / akgl_build (push) Successful in 9m55s
akbasic CI Build / mutation_test (push) Successful in 17m50s

Reflow the approved reference cases, shorten local fixture comments, and split the executable docs line so the 80-byte input buffer can read every source line.

Co-authored-by: andrew <andrew@aklabs.net>
This commit is contained in:
2026-08-04 16:12:42 -04:00
parent e13a8a6da1
commit 7d0ec1fe83
17 changed files with 39 additions and 38 deletions

View File

@@ -1,5 +1,5 @@
10 REM A field name is checked against a closed set the program declared, which
20 REM is the one thing in this language whose valid spellings are written down.
10 REM A field name is checked against the type's closed set, which
20 REM is the one thing here whose valid spellings are written down.
30 REM A misspelled *variable* is still silent -- see the last two lines.
40 TYPE RECT
50 W#

View File

@@ -17,7 +17,7 @@
170 RETURN B@.W#
180 PRINT WIDEN(A@)
190 PRINT A@.W#
200 REM To change one on purpose, pass a pointer. Assignment copies a pointer's
200 REM To change one, pass a pointer. Assignment copies the pointer.
210 REM reference, so the callee is looking at the caller's own record.
220 DIM Q@ AS PTR TO CRATE
230 POINT Q@ AT A@
@@ -37,7 +37,7 @@
370 N2@.COUNT# = 20
380 POINT N1@.TAIL@ AT N2@
390 DEF TOTAL(P@ AS PTR TO NODE)
395 REM A pointer is true when it points at something, which is how a walk knows
395 REM A pointer is true when it points at something, so a walk knows
396 REM where the list ends. NOT is the bitwise operator here, so the test is
397 REM written the positive way round.
400 IF P@->TAIL@ THEN RETURN P@->COUNT# + TOTAL(P@->TAIL@)

View File

@@ -1,4 +1,4 @@
10 REM A TYPE declares its fields; each takes its own type from its own suffix,
10 REM A TYPE declares fields; each takes its type from its own suffix,
20 REM which is the same rule every other name in this language follows.
30 TYPE COORD
40 X#

View File

@@ -1,6 +1,6 @@
10 REM A type name and a field name are bare words, and so is every verb, so
20 REM they share a namespace whether we like it or not. Both are refused with
30 REM the same rule the scanner already applies to variable names -- and a type
30 REM the same rule the scanner applies to variable names -- and a type
40 REM name is refused by the prescan, which can say so plainly rather than
50 REM leaving the parser to report "Expected expression or literal".
60 TYPE POINT