Commit Graph

2 Commits

Author SHA1 Message Date
7d0ec1fe83 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>
2026-08-04 16:12:42 -04:00
3edbf75547 Consume the COLON token: a line can hold several statements
The token has existed since the scanner was written and nothing read it, so
10 PRINT A$ : REM ... was a parse error. Leading separators are consumed
before each statement and an empty statement yields a NULL leaf rather than
an error, so a trailing colon and a run of them are both legal.

BASIC 7.0 scopes everything after THEN to the condition, which the reference
had no opinion about because it never got here. The rule is not "skip when
false": the rest of the line belongs to whichever arm was written last.

A whole FOR/NEXT on one line still does not loop -- block skipping works by
source line. Recorded in TODO.md as what group A has to fix first.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Andrew Kesterson <andrew@aklabs.net>
2026-07-31 11:46:10 -04:00