static L<S> tok_combineRoundOrCurlyBrackets(L<S> tok) { new L<S> l; for i over tok: { S t = tok.get(i); if (odd(i) && eqOneOf(t, "{", "(")) { int j = findEndOfBracketPart(tok, i); l.add(joinSubList(tok, i+1, j-1)); i = j-1; } else l.add(t); } ret l; }
Began life as a copy of #1013160
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: | #1013171 |
Snippet name: | tok_combineRoundOrCurlyBrackets |
Eternal ID of this version: | #1013171/1 |
Text MD5: | 6a2359f9d66d21f917cfb051d0089871 |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-27 02:58:35 |
Source code size: | 307 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 431 / 435 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1021307 - tok_combineSquareBrackets |