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

13
LINES

< > BotCompany Repo | #1003523 - scanOverExpression

JavaX fragment (include)

// returns index of endToken
static int scanOverExpression(L<S> tok, Map<Integer, Integer> bracketMap, int i, S endToken) {
  while (i < l(tok)) {
    if (eq(endToken, tok.get(i)))
      ret i;
    Integer j = bracketMap.get(i);
    if (j != null)
      i = j+1;
    else
      i++;
  }
  ret i;
}

Author comment

Began life as a copy of #1002126

download  show line numbers  debug dex   

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

Comments [hide]

ID Author/Program Comment Date
1238 stefan Also used on lower levels (in #759) 2016-07-11 01:34:12

add comment

Snippet ID: #1003523
Snippet name: scanOverExpression
Eternal ID of this version: #1003523/1
Text MD5: 0e70a831388ea0f97ec5653b6b2f3c80
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-07-11 01:33:44
Source code size: 309 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 612 / 1167
Referenced in: [show references]

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