Commit 155ad1e
[Pratt Parser] Refactor worker methods and parse unary operator chains iteratively.
- Extract helper methods (`ParseTernary`, `ParseSelectorChainTail`, `ParseUnaryOpsChain`, `ParseIdentOrCall`, `ParseNegativeIntLiteral`, `ParseNegativeDoubleLiteral`, `BuildBinaryCall`) to reduce the size of the call stack frames
- Process prefix unary operator chains (`!`, `-`) iteratively in `ParseUnaryOpsChain` to reduce stack growth on deep chains.
PiperOrigin-RevId: 9535469731 parent ed733ed commit 155ad1e
3 files changed
Lines changed: 267 additions & 116 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
726 | 738 | | |
727 | 739 | | |
728 | 740 | | |
| |||
747 | 759 | | |
748 | 760 | | |
749 | 761 | | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
750 | 786 | | |
751 | 787 | | |
752 | 788 | | |
| |||
1039 | 1075 | | |
1040 | 1076 | | |
1041 | 1077 | | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
1042 | 1090 | | |
1043 | 1091 | | |
1044 | 1092 | | |
| |||
0 commit comments