Files
akbasic/tests/language
Tachikoma a0ac978541 Reset the scanner's leftover token type between lines
The REM early-exit leaves tokentype holding AKBASIC_TOK_REM, and the scan
loop's post-switch check reads it before the next line's first character
has assigned anything. A line opening with whitespace then re-triggered
the REM break and scanned to nothing: every indented line after a REM was
silently skipped. Numbered programs never saw it -- the line number is the
first token and overwrites the leftover -- which is why the whole golden
corpus missed it and the unnumbered, indented galaga.bas found it.

Co-authored-by: andrew <andrew@aklabs.net>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XiGgpHuXUm2mR4Wzndw3dc
2026-08-04 20:05:41 -04:00
..

The language test corpus

The .bas files in this directory and their sibling .txt files are the editable language corpus. CMake registers every program as an individual local_* CTest case and compares its output with the sibling expectation.

The corpus includes cases carried over from the deprecated Go implementation as well as cases written for this interpreter. Their provenance is useful when investigating a regression, but it does not make any case immutable or turn the old implementation into a specification.

Change a program and its expectation deliberately and in the same commit. If the changed output represents an intentional language decision, record the reason in TODO.md or the relevant documentation. If it is an accidental change, fix the interpreter instead.

The examples/ subdirectory contains complete BASIC programs used as worked examples. It is part of the same corpus and follows the same .bas/.txt pairing rule.