1 | static S tok_bracketsToQuoted(S s) { |
2 | L<S> tok = javaTok(s); |
3 | new L<S> t; |
4 | Map<Int, Int> map = getBracketMap(tok); |
5 | for (int i = 0; i < l(tok); i++) { |
6 | Int dest = map.get(i); |
7 | if (dest != null) { |
8 | t.add(quote(join(subList(tok, i+2, dest-1)))); |
9 | i = dest; |
10 | } else |
11 | t.add(tok.get(i)); |
12 | } |
13 | ret join(t); |
14 | } |
Began life as a copy of #1003150
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1008282 |
Snippet name: | tok_bracketsToQuoted |
Eternal ID of this version: | #1008282/3 |
Text MD5: | 67494eb14834cf173b4357ad64010392 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-05-06 16:36:17 |
Source code size: | 344 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 506 / 510 |
Version history: | 2 change(s) |
Referenced in: | [show references] |