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

13
LINES

< > BotCompany Repo | #1008885 // ctxCaseGotos

JavaX fragment (include)

1  
// map: (condition -> goto)
2  
static SS ctxCaseGotos(S body) {
3  
  L<S> lines = lines(body);
4  
  int i = 0;
5  
  SS map = litorderedmap();
6  
  while (i < l(lines)) {
7  
    T3<S, S, Int> t = ctxCaseGoto(lines, i);
8  
    if (t == null) break;
9  
    map.put(t.a, t.b);
10  
    i = t.c+1;
11  
  }
12  
  ret map;
13  
}

Author comment

Began life as a copy of #1008883

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: #1008885
Snippet name: ctxCaseGotos
Eternal ID of this version: #1008885/4
Text MD5: 770edd8a4ae0412d4212075822776c5d
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-06-15 18:42:38
Source code size: 292 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 523 / 555
Version history: 3 change(s)
Referenced in: [show references]