static S tok_dropAllCurlyBrackets(S s) { ret join(tok_dropAllCurlyBrackets(javaTok(s))); } static L<S> tok_dropAllCurlyBrackets(L<S> tok) { new L<S> out; for (int i = 0; i < l(tok); i++) { S t = tok.get(i); if (eqOneOf(t, "{", "}")) tokAppend(out, l(out)-1, tok.get(++i)); // merge N tokens else out.add(t); } ret out; }
Began life as a copy of #1008895
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1017508 |
Snippet name: | tok_dropAllCurlyBrackets (makes copy) |
Eternal ID of this version: | #1017508/3 |
Text MD5: | 7a7747afe75028997de093883cd448b4 |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-07-24 12:44:05 |
Source code size: | 369 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 401 / 427 |
Version history: | 2 change(s) |
Referenced in: | [show references] |