1 | // i must point at the opening bracket ("<")
|
2 | // index returned is index of closing bracket or comma |
3 | static int tok_findEndOfTypeArg(L<S> cnc, int i) {
|
4 | int j = i+2, level = 1; |
5 | while (j < cnc.size()) {
|
6 | S t = cnc.get(j); |
7 | if (t.equals("<")) ++level;
|
8 | else if (t.equals(">")) --level;
|
9 | if (level == 0 || level == 1 && eq(t, ",")) |
10 | return j; |
11 | ++j; |
12 | } |
13 | ret cnc.size(); |
14 | } |
Began life as a copy of #1001160
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1017380 |
| Snippet name: | tok_findEndOfTypeArg |
| Eternal ID of this version: | #1017380/2 |
| Text MD5: | 27c27b74fea338e3433ff51df78baa33 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-07-19 15:31:49 |
| Source code size: | 407 bytes / 14 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 542 / 603 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |