Libraryless. Click here for Pure Java version (3876L/22K).
// i = C token to the right of type // returns start index of type static int tok_leftScanType(LS tok, int i) { while ping (true) { // first skip ellipsis if (subListEq(tok, i-6, ".", "", ".", "", ".")) i -= 6; // skip array brackets while (eqGet(tok, i-2, "]") && eqGet(tok, i-4, "[")) i -= 4; // skip type args i = tok_leftScanTypeArgsOpt(tok, i); i -= 2; // should be an identifier // package names / outer classes if (!eqGet(tok, i-2, ".")) break; i -= 2; } ret i; }
Began life as a copy of #1001156
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1027999 |
Snippet name: | tok_leftScanType |
Eternal ID of this version: | #1027999/14 |
Text MD5: | 02369c04307214e8b0a9d6761d1e45b5 |
Transpilation MD5: | 8911ddaedaf83c467795e4238bb9bf4c |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-15 22:17:09 |
Source code size: | 582 bytes / 25 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 229 / 356 |
Version history: | 13 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1032812 - tok_leftScanAkas |