Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1010102 // doubleReTok - reTok in two places (i1 through j1 and i2 through j2)

JavaX fragment (include)

1  
static void doubleReTok(L<S> tok, int i1, int j1, int i2, int j2) {
2  
  if (i1 > i2) {
3  
    int i = i1, j = j1;
4  
    i1 = i2; j1 = j2;
5  
    i2 = i; j2 = j;
6  
  }
7  
  if (j1 > i2) { reTok(tok); ret; }
8  
  reTok(tok, i2, j2);
9  
  reTok(tok, i1, j1);
10  
}

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: #1010102
Snippet name: doubleReTok - reTok in two places (i1 through j1 and i2 through j2)
Eternal ID of this version: #1010102/1
Text MD5: 633b4d8a713dc8c56e7e02d1fd4ed413
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-02 15:28:25
Source code size: 245 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 382 / 406
Referenced in: [show references]