1 | static L<S> tok_roundBracketsToQuoted(S s) { |
2 | L<S> tok = javaTok(s); |
3 | while true { |
4 | int i = tok.lastIndexOf("("); |
5 | if (i < 0) ret tok; |
6 | int j = indexOf(tok, ")", i); |
7 | if (j < 0) ret tok; |
8 | tok.set(i, quote(join(subList(tok, i+1, j)))); |
9 | tok.subList(i+1, j+1).clear(); |
10 | assertTrue(odd(l(tok))); |
11 | } |
12 | } |
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: | 508 / 526 |
Version history: | 2 change(s) |
Referenced in: | [show references] |