| ... | ... | @@ -529,6 +529,7 @@ pub const Tree = struct { |
| 529 | 529 | .PtrTypeSentinel, |
| 530 | 530 | .PtrType, |
| 531 | 531 | .PtrTypeBitRange, |
| 532 | .ArrayType, |
| 532 | 533 | .SwitchCaseOne, |
| 533 | 534 | .SwitchCase, |
| 534 | 535 | => n = datas[n].rhs, |
| ... | ... | @@ -902,6 +903,10 @@ pub const Tree = struct { |
| 902 | 903 | return main_tokens[n] + end_offset; |
| 903 | 904 | } |
| 904 | 905 | }, |
| 906 | .ArrayTypeSentinel => { |
| 907 | const extra = tree.extraData(datas[n].rhs, Node.ArrayTypeSentinel); |
| 908 | n = extra.elem_type; |
| 909 | }, |
| 905 | 910 | |
| 906 | 911 | // These are not supported by lastToken() because implementation would |
| 907 | 912 | // require recursion due to the optional comma followed by rbrace. |
| ... | ... | @@ -917,8 +922,6 @@ pub const Tree = struct { |
| 917 | 922 | .TaggedUnionEnumTag => unreachable, // TODO |
| 918 | 923 | .TaggedUnionEnumTagComma => unreachable, // TODO |
| 919 | 924 | .SwitchRange => unreachable, // TODO |
| 920 | | .ArrayType => unreachable, // TODO |
| 921 | | .ArrayTypeSentinel => unreachable, // TODO |
| 922 | 925 | }; |
| 923 | 926 | } |
| 924 | 927 | |