1 | static void removeToken(L<S> tok, int i) { |
2 | if (i+2 == l(tok)) { |
3 | truncateList(tok, i); |
4 | tok.set(i-1, ""); |
5 | ret; |
6 | } |
7 | |
8 | // join white space |
9 | if (!(tok.get(i-1).equals(" ") && tok.get(i+1).equals(" "))) |
10 | tok.set(i-1, tok.get(i) + tok.get(i+1)); |
11 | |
12 | // remove token |
13 | removeSubList(tok, i, i+2); |
14 | } |
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: | #1001693 |
Snippet name: | removeToken - merges whitespace |
Eternal ID of this version: | #1001693/5 |
Text MD5: | 94a2ff590fe2d2ee6937921faa175704 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-05-18 13:34:30 |
Source code size: | 327 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 716 / 934 |
Version history: | 4 change(s) |
Referenced in: | [show references] |