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

18
LINES

< > BotCompany Repo | #1001069 // hasInvocation bug test

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (337L/3K/10K).

!747

m {
  p {
    S s = loadSnippet("#1000867");
    L<S> tok = javaTok(s);
    print("synchroList: " + hasInvocation(tok, "synchroList"));
  }
  
  static boolean hasInvocation(List<String> tok, String f) {
    for (int i = 1; i < tok.size(); i += 2) {
      if (tok.get(i).equals(f))
        if (i == 1 || !tok.get(i-2).equals("."))
          return true;
    }
    return false;
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1001069
Snippet name: hasInvocation bug test
Eternal ID of this version: #1001069/1
Text MD5: c315d0b775b754b2105886a3799eeea2
Transpilation MD5: 3851eb658b3e2016edde6a5f4f3ea0d8
Author: stefan
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-09-19 17:33:22
Source code size: 406 bytes / 18 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 635 / 648
Referenced in: [show references]