static L<S> tok_combineCurlyBrackets(L<S> tok) { new L<S> l; for i over tok: { S t = tok.get(i); if (odd(i) && eq(t, "{")) { int j = findEndOfCurlyBracketPart(tok, i); l.add(joinSubList(tok, i+1, j-1)); i = j-1; } else l.add(t); } ret l; }
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: | 645 / 681 |
| Version history: | 3 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1011445 - tok_combineCurlyBrackets_keep #1012140 - tok_combineCurlyBraces - synonym of tok_combineCurlyBrackets |