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

13
LINES

< > BotCompany Repo | #1003523 - scanOverExpression

JavaX fragment (include)

1  
// returns index of endToken
2  
static int scanOverExpression(L<S> tok, Map<Integer, Integer> bracketMap, int i, S endToken) {
3  
  while (i < l(tok)) {
4  
    if (eq(endToken, tok.get(i)))
5  
      ret i;
6  
    Integer j = bracketMap.get(i);
7  
    if (j != null)
8  
      i = j+1;
9  
    else
10  
      i++;
11  
  }
12  
  ret i;
13  
}

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: 618 / 1174
Referenced in: [show references]

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