static L<S> tok_roundBracketsToQuoted(S s) { L<S> tok = javaTok(s); while true { int i = tok.lastIndexOf("("); if (i < 0) ret tok; int j = indexOf(tok, ")", i); if (j < 0) ret tok; tok.set(i, quote(join(subList(tok, i+1, j)))); tok.subList(i+1, j+1).clear(); assertTrue(odd(l(tok))); } }
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: | #1007458 |
| Snippet name: | tok_roundBracketsToQuoted |
| Eternal ID of this version: | #1007458/3 |
| Text MD5: | d93772d11b72aa295d66382ccce88e9a |
| Author: | stefan |
| Category: | javax / parsing |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-03-23 21:36:38 |
| Source code size: | 332 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 718 / 731 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |