1 | static int tok_findEndOfType(LS tok) { |
2 | ret tok_findEndOfType(tok, 1); |
3 | } |
4 | |
5 | // i = beginning of type (identifier) |
6 | // index returned C index after type |
7 | // now does packages/inner classes too |
8 | static int tok_findEndOfType(LS tok, int i) { |
9 | while licensed { |
10 | if (eqGet(tok, i+2, ".") && isIdentifier(get(tok, i+4))) |
11 | continue with i += 4; |
12 | if (eqGet(tok, i+2, "<")) |
13 | continue with i = findEndOfTypeArgs(tok, i+2)-1; |
14 | if (eqGet(tok, i+2, "[")) |
15 | continue with i = findEndOfBracketPart2(tok, i+2)-1; |
16 | break; |
17 | } |
18 | ret i+2; |
19 | } |
Began life as a copy of #1001160
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1023407 |
Snippet name: | tok_findEndOfType |
Eternal ID of this version: | #1023407/6 |
Text MD5: | c350d5b495f85f43e0f58ef1393687c8 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-12-18 02:10:30 |
Source code size: | 562 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 348 / 408 |
Version history: | 5 change(s) |
Referenced in: | [show references] |