1 | static L<S> tok_joinEllipsis_flex(L<S> tok) {
|
2 | for (int i = 1; i+4 < l(tok); i += 2) |
3 | if (allEq(".", get(tok, i), get(tok, i+2), get(tok, i+4))) {
|
4 | removeSubList(tok, i+1, i+5); |
5 | tok.set(i, "..."); |
6 | } |
7 | ret tok; |
8 | } |
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: | #1008439 |
| Snippet name: | tok_joinEllipsis_flex - join ". . ." or "..." into one token. Not very optimized |
| Eternal ID of this version: | #1008439/5 |
| Text MD5: | 524b4237ae3feafa5e4b8caa58b0f746 |
| Author: | stefan |
| Category: | javax / parsing |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-03-27 15:19:20 |
| Source code size: | 237 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 647 / 694 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |