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

13
LINES

< > BotCompany Repo | #1013213 // tok_findEndOfForExpression

JavaX fragment (include)

1  
// Return value is index of ")"
2  
static int tok_findEndOfForExpression(L<S> tok, int i) {
3  
  int level = 1;
4  
  
5  
  while (i < l(tok)) {
6  
    S t = tok.get(i);
7  
    if (eq(t, "(")) ++level;
8  
    else if (eq(t, ")"))
9  
      if (--level == 0) ret i;
10  
    i += 2;
11  
  }
12  
  ret i;
13  
}

Author comment

Began life as a copy of #1002453

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: #1013213
Snippet name: tok_findEndOfForExpression
Eternal ID of this version: #1013213/5
Text MD5: f3c9332db8ab2103065d936183650239
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-28 21:41:46
Source code size: 277 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 380 / 401
Version history: 4 change(s)
Referenced in: [show references]