1 | sS tok_dropRoundOrCurlyBrackets(S s) { |
2 | ret join(tok_dropRoundOrCurlyBrackets(javaTok(s))); |
3 | } |
4 | |
5 | static LS tok_dropRoundOrCurlyBrackets(LS tok) { |
6 | for (int i = 1; i < l(tok); i+= 2) { |
7 | while (eqGetOneOf(tok, i, "(", ")", "{", "}")) { |
8 | tokAppend(tok, i-1, tok.get(i+1)); |
9 | removeSubList(tok, i, i+2); |
10 | } |
11 | } |
12 | ret tok; |
13 | } |
Began life as a copy of #1025589
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1026115 |
Snippet name: | tok_dropRoundOrCurlyBrackets |
Eternal ID of this version: | #1026115/1 |
Text MD5: | ca5686d632e4b0927ddfe267f85c179f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-11-25 14:30:19 |
Source code size: | 346 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 178 / 216 |
Referenced in: | [show references] |