Libraryless. Click here for Pure Java version (2583L/17K).
1 | static L<S> tok_parseArgsDeclList2(LS tok) { |
2 | ret tok_parseArgsDeclList2(tok, getBracketMapIncludingAngleBrackets(tok)); |
3 | } |
4 | |
5 | static LS tok_parseArgsDeclList2(LS tok, Map<Int> bracketMap) { |
6 | int argStart = 1; |
7 | if (eqGet(tok, argStart, ",")) argStart += 2; |
8 | int i = argStart; |
9 | new LS args; |
10 | while (i < l(tok) && neq(get(tok, i), ")")) { |
11 | Int j = bracketMap.get(i); |
12 | if (j != null) continue with i = j+2; |
13 | if (eqGetOneOf(tok, i, ",")) { |
14 | if (i > argStart) args.add(trimJoinSubList(tok, argStart, i)); |
15 | argStart = i+2; |
16 | } |
17 | i += 2; |
18 | } |
19 | if (i > argStart) args.add(trimJoinSubList(tok, argStart, i)); |
20 | ret args; |
21 | } |
Began life as a copy of #1016801
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: | #1028001 |
Snippet name: | tok_parseArgsDeclList2 - can also start at comma |
Eternal ID of this version: | #1028001/3 |
Text MD5: | 02039e734267839ddf1050226f2166b6 |
Transpilation MD5: | d544859a67214462f5da2b68352a507f |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-04-26 20:32:10 |
Source code size: | 659 bytes / 21 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 239 / 340 |
Version history: | 2 change(s) |
Referenced in: | [show references] |