1 | static L<S> tok_combineCurlyBrackets(L<S> tok) { |
2 | new L<S> l; |
3 | for i over tok: { |
4 | S t = tok.get(i); |
5 | if (odd(i) && eq(t, "{")) { |
6 | int j = findEndOfCurlyBracketPart(tok, i); |
7 | l.add(joinSubList(tok, i+1, j-1)); |
8 | i = j-1; |
9 | } else |
10 | l.add(t); |
11 | } |
12 | ret l; |
13 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1011439 |
Snippet name: | tok_combineCurlyBrackets |
Eternal ID of this version: | #1011439/4 |
Text MD5: | ad699a96fc8794350ae85dbf890f20fe |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-21 10:49:28 |
Source code size: | 295 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 421 / 447 |
Version history: | 3 change(s) |
Referenced in: | [show references] |