1 | static L xtok_ampersand(L l) {
|
2 | int i = indexOfLiteralSubList(l, "&", "", "&"); |
3 | if (i < 2 || i+4 >= l(l)) ret l; // must have stuff on left and right |
4 | if (l(l) == 9) ret l; // already in best shape |
5 | new L x; |
6 | x.add(l.get(0)); |
7 | if (i == 2) x.add(l.get(1)); else x.add(cncComplete(subList(l, 1, i-1))); |
8 | x.addAll(subList(l, i-1, i+4)); |
9 | if (i+6 == l(l)) x.add(l.get(i+4)); else x.add(cncComplete(subList(l, i+4, l(l)-1))); |
10 | x.add(last(l)); |
11 | ret x; |
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: | #1008812 |
| Snippet name: | xtok_ampersand |
| Eternal ID of this version: | #1008812/2 |
| Text MD5: | 91ee47eb2be09cceb0b3da8a376a1640 |
| Author: | stefan |
| Category: | javax / parsing |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-06-09 02:57:33 |
| Source code size: | 469 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 679 / 741 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |