Commit ca14e9d
feat(selfhost): AST producer — unary !/~ + negative number literals → 245/569
- Negative number `-<num>` (exactly two tokens) emits `number -N`, checked before
binary/closure so it doesn't split as subtraction (matches parse_expr).
- Prefix `!x` desugars to `x == false` (binary equal, right `ident false`); `~x`
to `Int.bit_not(value: x)`; both after binary split, with paren-stripped operand.
Corpus reach: 242 -> 245 / 569 byte-exact, still 0 run-failures. Floor -> 245.
Diminishing returns confirmed: remaining mismatches are benchmark/selfhost files
that each stack several still-unsupported constructs (interpolation, effect-
receiver calls, fn attributes, protocols/impls). New sample unary.rss; 13 samples
byte-exact.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 6ad0633 commit ca14e9d
3 files changed
Lines changed: 41 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1522 | 1522 | | |
1523 | 1523 | | |
1524 | 1524 | | |
1525 | | - | |
| 1525 | + | |
1526 | 1526 | | |
1527 | 1527 | | |
1528 | 1528 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
237 | 243 | | |
238 | 244 | | |
239 | 245 | | |
| |||
250 | 256 | | |
251 | 257 | | |
252 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
253 | 273 | | |
254 | 274 | | |
255 | 275 | | |
| |||
315 | 335 | | |
316 | 336 | | |
317 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
318 | 351 | | |
319 | 352 | | |
320 | 353 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments