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

16
LINES

< > BotCompany Repo | #1001395 // getSupportedQuestions - superceded by findSupportedQuestionsInFunctions_impl

JavaX fragment (include)

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

static L<S> getSupportedQuestions(S programIDOrSrc) ctex {
  S src = isSnippetID(programIDOrSrc) ? loadSnippet(programIDOrSrc) : programIDOrSrc;
  new TreeSet<S> questions;
  L<S> tok = javaTok(src);
  for (int i = 1; i+4 < tok.size(); i += 2)
    if (getSupportedQuestions_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);
}

static L<S> getSupportedQuestions() {
  ret getSupportedQuestions(myJavaSource());
}

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: #1001395
Snippet name: getSupportedQuestions - superceded by findSupportedQuestionsInFunctions_impl
Eternal ID of this version: #1001395/5
Text MD5: 74d280f63fda54c46589d9a4e61ba9ac
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:38
Source code size: 633 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 707 / 985
Version history: 4 change(s)
Referenced in: #1001762 - getBotNameFromSnippet
#1002427 - Accellerating 629 (SPIKE)
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1009258 - findSupportedQuestionsInFunctions
#3000190 - Answer for stefanreich(>> t 20 questions)
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)