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

13
LINES

< > BotCompany Repo | #1002126 // scanToEndOfInitializer - better use scanToEndOfInitializer2

JavaX fragment (include)

// returns index of trailing N token
static int scanToEndOfInitializer(L<S> tok, Map<Integer, Integer> bracketMap, int i) {
  while (i < l(tok)) {
    if (eqOneOf(tok.get(i), ";", ",", ")", "}"))
      ret i-1;
    Integer j = bracketMap.get(i);
    if (j != null)
      i = j+1;
    else
      i++;
  }
  ret i;
}

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: #1002126
Snippet name: scanToEndOfInitializer - better use scanToEndOfInitializer2
Eternal ID of this version: #1002126/4
Text MD5: 37f71ea3fdb5916381054f5928d1dff2
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-27 13:40:54
Source code size: 326 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 680 / 1142
Version history: 3 change(s)
Referenced in: #1002427 - Accellerating 629 (SPIKE)
#1003523 - scanOverExpression
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1021798 - scanToEndOfInitializer2
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)