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

16
LINES

< > BotCompany Repo | #1001056 // interpret function

JavaX fragment (include)

1  
static void interpret(S cmd) {
2  
  L<S> tok = javaTok(cmd);
3  
  S functionName = tok.get(1);
4  
  new L<S> args;
5  
  if (tok.size() > 7) {
6  
    assertEquals("(", tok.get(3));
7  
    int i = 5;
8  
    while (i < tok.size() && !eq(tok.get(i), ")")) {
9  
      args.add(unquote(tok.get(i)));
10  
      i += 2;
11  
      if (tok.get(i).equals(","))
12  
        i += 2;
13  
    }
14  
  }
15  
  call(main.class, functionName, args.toArray(new String[args.size()]));
16  
}

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: #1001056
Snippet name: interpret function
Eternal ID of this version: #1001056/1
Text MD5: db3cf268c701fca5bd1698dd9fee93d9
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-09-18 01:55:15
Source code size: 435 bytes / 16 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 828 / 1034
Referenced in: [show references]