|
| 1 | +# More Language Rules Checklist |
| 2 | + |
| 3 | +## Scope To Add Up Front |
| 4 | +- [ ] Numeric separators in literals (`3_000`, `1_000_000`, `0xFF_AA_22`, `0b1111_0000`, `3.141_592_653`) |
| 5 | +- [ ] Trailing commas are permitted (optional), never required, in all list-like grammar positions (params, args, fields, variants, tuple/array literals, match arms, imports) |
| 6 | +- [ ] Raw string literals (including delimiter variants, if adopted) |
| 7 | +- [ ] Multiline string indentation behavior (dedent/strip policy) |
| 8 | +- [ ] Byte literals (`b'A'`) and clear typing rules |
| 9 | +- [ ] Unused binding syntax (`_`) in all binding positions |
| 10 | +- [ ] String escapes parity (`\\xNN`, `\\0`, and existing escapes) across string kinds |
| 11 | +- [ ] `todo` and `unreachable` expressions with `Never` typing behavior |
| 12 | +- [ ] No-shadowing language rule (explicitly enforced) |
| 13 | +- [ ] Pipeline-first migration guidance for shadowing-heavy Rust patterns |
| 14 | + |
| 15 | +## 1. Specification Updates (`docs/with-specification.md`) |
| 16 | +- [ ] Add numeric separator lexical grammar and invalid forms |
| 17 | +- [ ] Add trailing comma grammar rules and examples |
| 18 | +- [ ] Explicitly state trailing commas are optional/permitted and never required |
| 19 | +- [ ] Add raw string grammar, escaping semantics, and delimiter rules |
| 20 | +- [ ] Add multiline string indentation/dedent semantics with examples |
| 21 | +- [ ] Add byte literal grammar and type rules |
| 22 | +- [ ] Add unused binding rule (`_`) for let, params, patterns, loops, match |
| 23 | +- [ ] Add/clarify string escape table including hex/null escapes |
| 24 | +- [ ] Add `todo`/`unreachable` semantics and type-checking rules |
| 25 | +- [ ] Add explicit no-shadowing rule and diagnostics expectations |
| 26 | +- [ ] Add spec examples for pipeline replacements where shadowing is disallowed |
| 27 | + |
| 28 | +## 2. Idiomatic Guide Updates (`docs/with-idiomatic-guide.md`) |
| 29 | +- [ ] Add style guidance for numeric separators |
| 30 | +- [ ] Add trailing-comma style guidance |
| 31 | +- [ ] Add raw/multiline string best practices |
| 32 | +- [ ] Add byte-literal usage examples |
| 33 | +- [ ] Add unused-binding (`_`) idioms |
| 34 | +- [ ] Add `todo`/`unreachable` development guidance |
| 35 | +- [ ] Add no-shadowing coding patterns with pipeline-first style |
| 36 | + |
| 37 | +## 3. Migration Guide Updates (`docs/with-migration-guide.md`) |
| 38 | +- [ ] Add Rust-to-With numeric separator examples |
| 39 | +- [ ] Add Rust-to-With trailing comma expectations |
| 40 | +- [ ] Add Rust-to-With raw string and multiline string examples |
| 41 | +- [ ] Add Rust-to-With byte literal examples |
| 42 | +- [ ] Add Rust-to-With unused variable mappings (`_`) |
| 43 | +- [ ] Add Rust shadowing -> With pipeline cookbook section |
| 44 | +- [ ] Add diagnostics mapping for no-shadowing migration errors |
| 45 | + |
| 46 | +## 4. Bootstrap Compiler Implementation (`bootstrap/`) |
| 47 | +- [ ] Lexer: accept numeric separators for integer/float/radix literals |
| 48 | +- [ ] Lexer: add raw string tokenization |
| 49 | +- [ ] Lexer: add byte literal tokenization and validation |
| 50 | +- [ ] Parser: accept optional trailing commas across all targeted productions (no trailing comma must still parse) |
| 51 | +- [ ] Parser/Sema: `_` binding handling across binding contexts |
| 52 | +- [ ] Parser/Sema: enforce no-shadowing rule with clear diagnostics |
| 53 | +- [ ] Sema: `todo`/`unreachable` expression typing (`Never`) and propagation |
| 54 | +- [ ] String literal processing: add `\\xNN` and `\\0` behavior parity |
| 55 | +- [ ] Add/extend bootstrap tests for each new rule and failure mode |
| 56 | +- [ ] Ensure dump outputs remain deterministic after grammar/lexer changes |
| 57 | + |
| 58 | +## 5. Self-Hosted Compiler Implementation (`src/`) |
| 59 | +- [ ] Mirror lexer support for numeric separators |
| 60 | +- [ ] Mirror lexer support for raw strings |
| 61 | +- [ ] Mirror lexer support for byte literals |
| 62 | +- [ ] Mirror parser support for optional trailing commas (no trailing comma must still parse) |
| 63 | +- [ ] Mirror parser/sema support for `_` unused bindings |
| 64 | +- [ ] Mirror no-shadowing diagnostics and enforcement |
| 65 | +- [ ] Mirror `todo`/`unreachable` typing behavior |
| 66 | +- [ ] Mirror string escape behavior (`\\xNN`, `\\0`, etc.) |
| 67 | +- [ ] Add/extend selfhost tests for each feature and error case |
| 68 | +- [ ] Confirm Stage0/Stage2 parity on new coverage corpus |
| 69 | + |
| 70 | +## 6. Source Conformance Pass (Repo-Wide) |
| 71 | +- [ ] Run formatter/lint and compile all With source |
| 72 | +- [ ] Audit and replace shadowing-style code with pipeline patterns |
| 73 | +- [ ] Update existing examples/tests to follow new no-shadowing rule |
| 74 | +- [ ] Add migration notes for any nontrivial source rewrites |
| 75 | + |
| 76 | +## 7. Validation Gates |
| 77 | +- [ ] Bootstrap test suite passes |
| 78 | +- [ ] Selfhost test suite passes |
| 79 | +- [ ] Wave parity scripts still pass |
| 80 | +- [ ] New language-rule corpus passes on both compilers |
| 81 | +- [ ] No unresolved known divergences for these features |
0 commit comments