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

14
LINES

< > BotCompany Repo | #1001762 // getBotNameFromSnippet

JavaX fragment (include)

  // covers the common cases
  static S getBotNameFromSnippet(S programID) ctex {
    S src = loadSnippet(programID);
    L<S> tok = javaTok(src);
    S[] m;
    for (S pat : litlist(
      "new Android3(*",
      "makeAndroid(*", "makeAndroid3(*", "makeSilentAndroid(*",
      "addToMultiPort(*")) {
      m = find2(javaTok(pat), tok);
      if (m != null && isQuoted(m[0])) ret unquote(m[0]);
    }
    ret null;
  }

Author comment

Began life as a copy of #1001395

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: #1001762
Snippet name: getBotNameFromSnippet
Eternal ID of this version: #1001762/1
Text MD5: 5a61e7c2e88b3b89672b144bb8dd9060
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-11-13 17:46:15
Source code size: 431 bytes / 14 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 685 / 2230
Referenced in: [show references]