Commit 0dbc7f0
authored
`max_tokens=0` was compiled into a token-limited lexeme that never
terminates at runtime (the `{`-then-garbage symptom in #236). Since a
rule capped at zero tokens can only match the empty string, this
special-cases it to compile to `""`, placed before the
stop/terminal/subgrammar dispatch so it's handled uniformly for all body
types. Includes a regression test (`test_ll_max_tokens_zero`) with the
issue's repro plus a `name: ""` equivalence baseline. Full parser suite
+ fmt + clippy clean.
1 parent c9bedc5 commit 0dbc7f0
2 files changed
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
527 | 538 | | |
528 | 539 | | |
529 | 540 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
683 | 708 | | |
684 | 709 | | |
685 | 710 | | |
| |||
0 commit comments