E06-S06 routes deletion through a fat reference to obj_delete behind the heap's
always-on validation, so a stale value is refused with IF_ERR_FREED instead of
reading a freed destructor, and adds the objects.n8 parser fixture.
E07-S02 shares one launcher implementation that locks the writable image and
waits for the emulator exit and image flush, with x64sc for the editor and x128
for the compiler.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Adds control flow, field access, forward self calls, method/program entry tracking, and E227 emission-failure reporting. Print vectors now live in safe zero-page cells to avoid the 6502 indirect-JMP page bug.
Statement emission now runs from parser pass 2: assignment, byte + and -, and
print reach codegen.s through emit.s, and the statements fixture executes the
emitted bytes in x128. Restoring the parser trace fixture's length arithmetic
(it emitted between the two halves of the subtraction, which clears carry)
brings the 41-fixture parser verification back to green after emit.s joined
the link.
Also check in the vim clone's improved C128 build and the Power C
reverse-engineering notes and tools.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Number interface methods in source order and check each class against every
implemented interface, reporting missing, private, mismatched, conflicting,
and non-interface implementations at the class declaration.
Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
Compute sizes and offsets after the declaration pass so forward references
have a kind, report E096 for instances over 65535 bytes, and record the
layout in the parser harness so declaration order is fixture-checked.
Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
types.s gives every expression a type and applies the spec 3.4/8
conversions, operator table, constant folding and diagnostic spellings.
parser.s records implements lists and init rows in pass 1, carries types
through member chains, groups, calls and indexing in pass 2, and checks
assignments, arguments, returns, conditions, for, print, delete and member
access. A method that declares a result must end in return; a missing one
is E150 at end, and a program return value is E151.
Three older parser fixtures gain true diagnostics. The lexer's host
reference formatter now spells bytes such as {0D} correctly, and the demo
tolerates a missing ERR file.
Verified in x128: 37 parser fixtures, 10 lexer fixtures, the 67-entry
diagnostic catalog, and the Vim-to-N8CHECK demo (good.n8 clean, bad.n8's
four diagnostics).
Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
parse_statement parses every spec 7 form (assignment, call, if/else,
while, for/to/step, return, print, delete) and requires the line to end
after it. Expressions use precedence climbing over spec 8's levels: binary
operators left associative, unary not and - nesting rightwards, postfix
member access, calls, and indexing tightest. A syntax error is reported in
pass 1, unwinds to the statement, and skips the line; E03-S02's name,
member, and access checks now run from the parser in pass 2, replacing the
token scan. Expression nesting is bounded at 16 levels (E225).
Verified in x128: 31 fixtures, including the two statement fixtures that
were pending since E03-S01, a postfix trace golden for precedence and
associativity (both mutations caught), every statement form, and 15
independent syntax errors with recovery. Lowest stack pointer $A7. New
diagnostics E038-E042 and E225. The demo passes; its Vim typing is slowed
to 200 ms per key after one doubled keystroke.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pass 1 now records every field and method signature (access, type,
parameter types) in bank-1 member and parameter tables, rejects duplicate
fields or methods per type, invalid init/destroy shapes (E151/E152, D122),
and `var` after a method statement or inside a block. Each signature and the
program open a typed local scope. Pass 2 scans statement lines: unqualified
names must be locals, parameters, or fields of the enclosing class (D123),
and member chains through locals, fields, self, new, calls, and indexing
report unknown members (E061) and private access (E120) at the member.
The parser test PRG grew past $4000 and crashed: mmu_init copies the COMMON
load image in the system mapping, where BASIC ROM hides $4000+. COMMON now
loads right after STARTUP and mmu.s asserts both stay below $4000.
Verified in x128: 28 fixtures, member tables against a source-derived
oracle, privacy and scope mutations caught; map, source, lexer, names, and
diagnostics suites pass on the new layout.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
parser.s runs two passes over the cached source. Pass 1 parses interfaces,
classes (implements lists, fields, method headers), and the one program,
records top-level types in a bank-1 table, tracks method/program/if/while/
for blocks, checks duplicate locals, and reports syntax, ordering, and
duplicate errors with line-level recovery. Pass 2 reports type references
that name no declared type, so forward references are legal.
Verified in x128 against 24 fixtures through the real ERR files: 7/7
accepted, 10/12 rejected grammar fixtures at their sidecar positions
(line_cont and multi_stmt are statement-level, pending E03-S03), and five
parser fixtures matching their complete diagnostic lists. A pass-order
mutation is caught. D121 (proposed): method names may be keywords, as
spec 5.1's `method print()` requires.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>