Commit 1a19d3c
committed
Support doc comments on enum cases
Because php supports doc comments on class constants, I believe it would also
make sense to support them on enum cases.
I don't have strong opinions about whether attributes should be moved to be the
last element or whether the doc comment should go after the attribute,
but the ast will likely change again before php 8.1 is stable.
So far, all attributes are the last ast child node.
I didn't notice that doc comments weren't implemented due to
php#6489 being a large change.
https://wiki.php.net/rfc/enumerations
did not mention whether or not doc comments were meant to be supported1 parent 008bfcc commit 1a19d3c
File tree
5 files changed
+39
-10
lines changed- Zend
- ext/reflection/tests
5 files changed
+39
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2201 | 2201 | | |
2202 | 2202 | | |
2203 | 2203 | | |
2204 | | - | |
2205 | | - | |
| 2204 | + | |
| 2205 | + | |
2206 | 2206 | | |
2207 | 2207 | | |
2208 | 2208 | | |
| |||
2329 | 2329 | | |
2330 | 2330 | | |
2331 | 2331 | | |
| 2332 | + | |
2332 | 2333 | | |
2333 | 2334 | | |
2334 | 2335 | | |
2335 | 2336 | | |
2336 | 2337 | | |
2337 | | - | |
2338 | | - | |
2339 | | - | |
2340 | 2338 | | |
2341 | 2339 | | |
2342 | 2340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
163 | 162 | | |
164 | 163 | | |
165 | 164 | | |
166 | 165 | | |
167 | 166 | | |
168 | 167 | | |
169 | 168 | | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7748 | 7748 | | |
7749 | 7749 | | |
7750 | 7750 | | |
7751 | | - | |
| 7751 | + | |
| 7752 | + | |
| 7753 | + | |
| 7754 | + | |
| 7755 | + | |
| 7756 | + | |
| 7757 | + | |
| 7758 | + | |
| 7759 | + | |
7752 | 7760 | | |
7753 | 7761 | | |
7754 | 7762 | | |
7755 | | - | |
| 7763 | + | |
7756 | 7764 | | |
7757 | 7765 | | |
7758 | 7766 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
610 | | - | |
611 | | - | |
| 610 | + | |
| 611 | + | |
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments