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

16
LINES

< > BotCompany Repo | #1001056 // interpret function

JavaX fragment (include)

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

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: 829 / 1034
Referenced in: #1002427 - Accellerating 629 (SPIKE)
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)