1 | static S lineAroundToken(L<S> tok, int tokenIndex) {
|
2 | int i = tokenIndex, j = tokenIndex; |
3 | while (i > 1 && !containsNewLine(get(tok, i-1))) |
4 | i -= 2; |
5 | while (j+2 < l(tok) && !containsNewLine(get(tok, j+1))) |
6 | j += 2; |
7 | ret afterLineBreak(get(tok, i-1)) + joinSubList(tok, i, j+1) + beforeLineBreak(get(tok, j+1)); |
8 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1016575 |
| Snippet name: | lineAroundToken |
| Eternal ID of this version: | #1016575/4 |
| Text MD5: | 351288237efdd76bb97be3a4315909af |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-06-24 00:42:35 |
| Source code size: | 329 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 619 / 642 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |