From 0d6f0f1f44a3281e3ba9e8c432788c5b71ec5cbe Mon Sep 17 00:00:00 2001 From: Luis <42945842+ldiaz94@users.noreply.github.com> Date: Sat, 10 Oct 2026 08:37:09 +0000 Subject: [PATCH] Stage 2 done: record the lines --- diff --git a/PLAN.md b/PLAN.md index b234779..33426f9 100644 --- a/PLAN.md +++ b/PLAN.md @@ -54,20 +54,20 @@ ## The compiler, in reading order -Lines after stage 1, all of them and those of code (neither blank nor +Lines after stage 2, all of them and those of code (neither blank nor only comment), as `make loc` counts them: | File | Lines | Code | What | |---|---|---|---| | `src/scan.pas` | 548 | 471 | Symbols, literals, comments, error messages | -| `src/sym.pas` | 476 | 396 | Types, objects, scopes, layout | -| `src/x64.pas` | 613 | 491 | Code buffer, chunks, fixups, instruction encoder | -| `src/gen.pas` | 1,177 | 1,035 | Items: loading, storing, copying, frames, calls | -| `src/parse.pas` | 1,347 | 1,250 | Declarations, statements, expressions, built-ins | +| `src/sym.pas` | 492 | 410 | Types, objects, scopes, layout | +| `src/x64.pas` | 620 | 497 | Code buffer, chunks, fixups, instruction encoder | +| `src/gen.pas` | 1,354 | 1,193 | Items: loading, storing, copying, frames, calls | +| `src/parse.pas` | 1,754 | 1,626 | Declarations, statements, expressions, built-ins | | `src/link.pas` | 123 | 92 | Tree shaking, layout, patching | | `src/elf.pas` | 185 | 147 | Static ELF, symbol table | | `src/jed.pas` | 111 | 83 | The command line, the entry point | -| total | 4,580 | 3,965 | | +| total | 5,187 | 4,519 | | ## Steps diff --git a/src/parse.pas b/src/parse.pas index 87b41e5..4663e75 100644 --- a/src/parse.pas +++ b/src/parse.pas @@ -12,8 +12,7 @@ interface. Depends on: scan, sym, x64, gen. - Leaves out (for later stages): multiple results, errors, enumerations - and sets, record literals, defer, NEW, generic modules, extern. } + Leaves out (for stage 3): extern and link. } unit parse;