Commit 6e2754b
fix: literals shouldn't emit original, block inner strip, UndefinedLiteral.value
Three related AST shape fixes to match the reference builder:
1. Literals (String/Number/Boolean/Null/Undefined) no longer emit
`original` from Rust. The JS wrapper adds it as a non-enumerable
getter that returns value — matching the reference builder's
defineProperty pattern.
2. UndefinedLiteral needs a real `value: undefined` own property on
its node, not a missing key. The JS wrapper assigns this after
conversion since JSON can't serialize undefined.
3. BlockStatement's inner strip flags now apply whitespace stripping
to program/inverse bodies:
openStrip.close → trim leading ws in program body first text
inverseStrip.open → trim trailing ws in program body last text
inverseStrip.close → trim leading ws in inverse body first text
closeStrip.open → trim trailing ws in inverse (or program)
body last text
Local test count: 326 → 190 → (expected further drop)
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>1 parent 710f3cb commit 6e2754b
5 files changed
Lines changed: 68 additions & 9 deletions
File tree
- packages/@glimmer/syntax
- lib/parser
- pkg
- standalone
- src
Lines changed: 67 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
346 | 373 | | |
347 | 374 | | |
348 | 375 | | |
| |||
354 | 381 | | |
355 | 382 | | |
356 | 383 | | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
357 | 398 | | |
358 | 399 | | |
359 | 400 | | |
| |||
432 | 473 | | |
433 | 474 | | |
434 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
435 | 502 | | |
436 | 503 | | |
437 | 504 | | |
| |||
Binary file not shown.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
263 | 262 | | |
264 | 263 | | |
265 | 264 | | |
| |||
268 | 267 | | |
269 | 268 | | |
270 | 269 | | |
271 | | - | |
272 | 270 | | |
273 | 271 | | |
274 | 272 | | |
| |||
277 | 275 | | |
278 | 276 | | |
279 | 277 | | |
280 | | - | |
281 | 278 | | |
282 | 279 | | |
283 | 280 | | |
| |||
294 | 291 | | |
295 | 292 | | |
296 | 293 | | |
297 | | - | |
298 | 294 | | |
299 | 295 | | |
300 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | | - | |
593 | 592 | | |
594 | 593 | | |
595 | 594 | | |
| |||
601 | 600 | | |
602 | 601 | | |
603 | 602 | | |
604 | | - | |
605 | 603 | | |
606 | 604 | | |
607 | 605 | | |
| |||
613 | 611 | | |
614 | 612 | | |
615 | 613 | | |
616 | | - | |
617 | 614 | | |
618 | 615 | | |
619 | 616 | | |
| |||
631 | 628 | | |
632 | 629 | | |
633 | 630 | | |
634 | | - | |
635 | 631 | | |
636 | 632 | | |
637 | 633 | | |
| |||
0 commit comments