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