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

13
LINES

< > BotCompany Repo | #1010547 - tok_endOfImplementsList

JavaX fragment (include)

// i = index of "implements"/"extends"
static int tok_endOfImplementsList(L<S> tok, int i) {
  int level = 0;
  while (i < l(tok)) {
    S t = tok.get(i);
    if (eq(t, "<")) ++level;
    else if (eq(t, ">")) {
      if (level == 0) ret i; else --level;
    } else if (eq(t, "{")) ret i;
    i += 2;
  }
  ret i;
}

download  show line numbers  debug dex   

Travelled to 9 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1010547
Snippet name: tok_endOfImplementsList
Eternal ID of this version: #1010547/1
Text MD5: 15133cc234084f50029cf3fe1cff6d78
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-20 16:58:40
Source code size: 328 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 216 / 223
Referenced in: [show references]

Formerly at http://tinybrain.de/1010547 & http://1010547.tinybrain.de