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

16
LINES

< > BotCompany Repo | #1003193 // parseStdFunctionsList

JavaX fragment (include)

1  
// map contains function name -> snippet id
2  
static SS parseStdFunctionsList(S snippetSrc) {
3  
  ret parseStdFunctionsList(snippetSrc, new LinkedHashMap);
4  
}
5  
6  
static SS parseStdFunctionsList(S snippetSrc, SS map) {
7  
  L<S> tok = javaTok(snippetSrc);
8  
  int i = findCodeTokens(tok, "standardFunctions", "=", "litlist", "(");
9  
  int opening = i+6;
10  
  int closing = indexOf(tok, ")", opening)-1;
11  
  for (i = opening+2; i < closing; i += 4) {
12  
    S[] f = unquote(tok.get(i)).split("/");
13  
    map.put(f[1], f[0]);
14  
  }
15  
  ret map;
16  
}

Author comment

Began life as a copy of #1001994

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: #1003193
Snippet name: parseStdFunctionsList
Eternal ID of this version: #1003193/3
Text MD5: 319bfd36d1e2c1a2ac48648b09979598
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-08 00:31:52
Source code size: 530 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 598 / 560
Version history: 2 change(s)
Referenced in: [show references]