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

12
LINES

< > BotCompany Repo | #1009345 // findSupportedQuestionsInFunctions_impl

JavaX fragment (include)

static L<S> findSupportedQuestionsInFunctions_functionNames = litlist("match", "match3", "flexmatch");

static L<S> findSupportedQuestionsInFunctions_impl(S src, S... functionsToScan) {
  new TreeSet<S> questions;
  if (src != null)
    for (L<S> tok : tok_findMainFunctionsNamed(src, functionsToScan))
      for (int i = 1; i+4 < tok.size(); i += 2)
        if (findSupportedQuestionsInFunctions_functionNames.contains(tok.get(i)) && tok.get(i+2).equals("(")
        && isQuoted(tok.get(i+4)))
          questions.add(unquote(tok.get(i+4)));
  ret asList(questions);
}

Author comment

Began life as a copy of #1009258

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1009345
Snippet name: findSupportedQuestionsInFunctions_impl
Eternal ID of this version: #1009345/4
Text MD5: 4c90a3347239105d18885a2d6abb03e5
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-18 16:19:22
Source code size: 580 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 525 / 549
Version history: 3 change(s)
Referenced in: [show references]