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

10
LINES

< > BotCompany Repo | #1003837 // tok_importsClassNamed

JavaX fragment (include)

1  
static bool tok_importsClassNamed(L<S> tok, S className) {
2  
  for (int i = 1; i < l(tok); i += 2)
3  
    if (eq(tok.get(i), "import")) {
4  
      int j = findEndOfStatement(tok, i); // index of ;+1
5  
      if (eq(get(tok, j-3), className))
6  
        ret true;
7  
      i = j-1;
8  
    }
9  
  ret false;
10  
}

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: #1003837
Snippet name: tok_importsClassNamed
Eternal ID of this version: #1003837/1
Text MD5: 68aab5f6a4f0fe1725d74833ce6965f5
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-08-07 13:39:04
Source code size: 293 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 565 / 627
Referenced in: [show references]