Commit 01dddf6
[_fe_analyzer_shared] Shared literal parsing
This adds shared helpers for parsing bool, int, and double literals to
their corresponding values.
The macro metadata literals are updated support digit separators and
to hold the literal value.
Change-Id: I709018b6c3a3b8ab09188d36c28f3c09636e0ea0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391964
Reviewed-by: Konstantin Shcheglov <[email protected]>
Reviewed-by: Jens Johansen <[email protected]>
Commit-Queue: Johnni Winther <[email protected]>1 parent d1d029f commit 01dddf6
File tree
8 files changed
+107
-46
lines changed- pkg
- analyzer/lib/src/fasta
- front_end/lib/src/kernel
- macro
8 files changed
+107
-46
lines changedLines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
94 | 97 | | |
95 | | - | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | | - | |
| 101 | + | |
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| 109 | + | |
106 | 110 | | |
107 | | - | |
| 111 | + | |
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
| |||
114 | 118 | | |
115 | 119 | | |
116 | 120 | | |
117 | | - | |
| 121 | + | |
118 | 122 | | |
119 | | - | |
| 123 | + | |
120 | 124 | | |
121 | 125 | | |
122 | | - | |
| 126 | + | |
123 | 127 | | |
124 | 128 | | |
125 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
580 | | - | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
581 | 588 | | |
582 | 589 | | |
583 | 590 | | |
584 | 591 | | |
585 | | - | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
586 | 600 | | |
587 | 601 | | |
588 | 602 | | |
589 | 603 | | |
590 | | - | |
| 604 | + | |
591 | 605 | | |
592 | 606 | | |
593 | 607 | | |
| |||
953 | 967 | | |
954 | 968 | | |
955 | 969 | | |
956 | | - | |
| 970 | + | |
| 971 | + | |
957 | 972 | | |
958 | 973 | | |
959 | 974 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
45 | 53 | | |
46 | 54 | | |
47 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
128 | 132 | | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
135 | | - | |
| 139 | + | |
136 | 140 | | |
137 | 141 | | |
138 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
49 | | - | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
4708 | 4710 | | |
4709 | 4711 | | |
4710 | 4712 | | |
4711 | | - | |
4712 | | - | |
| 4713 | + | |
4713 | 4714 | | |
4714 | 4715 | | |
4715 | 4716 | | |
| |||
4745 | 4746 | | |
4746 | 4747 | | |
4747 | 4748 | | |
4748 | | - | |
4749 | | - | |
4750 | | - | |
4751 | | - | |
4752 | 4749 | | |
4753 | 4750 | | |
4754 | 4751 | | |
4755 | | - | |
| 4752 | + | |
4756 | 4753 | | |
4757 | 4754 | | |
4758 | 4755 | | |
| |||
4766 | 4763 | | |
4767 | 4764 | | |
4768 | 4765 | | |
4769 | | - | |
| 4766 | + | |
4770 | 4767 | | |
4771 | 4768 | | |
4772 | 4769 | | |
| |||
4784 | 4781 | | |
4785 | 4782 | | |
4786 | 4783 | | |
4787 | | - | |
4788 | 4784 | | |
4789 | 4785 | | |
4790 | 4786 | | |
4791 | | - | |
| 4787 | + | |
4792 | 4788 | | |
4793 | 4789 | | |
4794 | 4790 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | | - | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
29 | | - | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
3526 | 3529 | | |
3527 | 3530 | | |
3528 | 3531 | | |
3529 | | - | |
| 3532 | + | |
3530 | 3533 | | |
3531 | 3534 | | |
3532 | 3535 | | |
| |||
4795 | 4798 | | |
4796 | 4799 | | |
4797 | 4800 | | |
4798 | | - | |
4799 | | - | |
| 4801 | + | |
4800 | 4802 | | |
4801 | 4803 | | |
4802 | 4804 | | |
4803 | 4805 | | |
4804 | 4806 | | |
4805 | 4807 | | |
4806 | 4808 | | |
4807 | | - | |
| 4809 | + | |
4808 | 4810 | | |
4809 | 4811 | | |
4810 | 4812 | | |
| |||
4819 | 4821 | | |
4820 | 4822 | | |
4821 | 4823 | | |
4822 | | - | |
4823 | | - | |
| 4824 | + | |
4824 | 4825 | | |
4825 | 4826 | | |
4826 | 4827 | | |
| |||
Lines changed: 9 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
406 | 405 | | |
407 | 406 | | |
408 | 407 | | |
409 | | - | |
410 | | - | |
| 408 | + | |
411 | 409 | | |
412 | 410 | | |
413 | 411 | | |
414 | 412 | | |
415 | | - | |
416 | | - | |
| 413 | + | |
| 414 | + | |
417 | 415 | | |
418 | 416 | | |
419 | 417 | | |
420 | 418 | | |
421 | | - | |
422 | | - | |
423 | | - | |
| 419 | + | |
| 420 | + | |
424 | 421 | | |
425 | 422 | | |
426 | 423 | | |
427 | 424 | | |
428 | | - | |
429 | | - | |
| 425 | + | |
| 426 | + | |
430 | 427 | | |
431 | 428 | | |
432 | 429 | | |
433 | 430 | | |
434 | | - | |
435 | | - | |
| 431 | + | |
| 432 | + | |
436 | 433 | | |
437 | 434 | | |
438 | 435 | | |
| |||
0 commit comments