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

34
LINES

< > BotCompany Repo | #737 // Generic snippet interpreter (developing)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Transpiled version (258L) is out of date.

1  
!636
2  
!standard functions
3  
4  
main {
5  
  psvm {
6  
    String snippetID = "#1000574";
7  
    if (args.length != 0) snippetID = args[0];
8  
    
9  
    new StringBuilder buf;
10  
    String prog = null;
11  
    buf.append("== Please concat programs ==\n");
12  
    int programNr = 0;
13  
    for (String l : toLines(loadSnippet(snippetID))) {
14  
      l = l.trim();
15  
      if (l.length() == 0) continue;
16  
      String id = findSnippetNamed(l);
17  
      if (id == null)
18  
        buf.append("// Ignoring line: " + l + "\n");
19  
      else {
20  
        ++programNr;
21  
        buf.append("== Program " + programNr + " ==\n");
22  
        prog = loadSnippet(id);
23  
        buf.append(prog + "\n");
24  
      }
25  
    }
26  
    print ""
27  
    String result;
28  
    if (programNr == 1)
29  
      result = prog;
30  
    else
31  
      result = buf.toString();
32  
    System.out.println(result);
33  
  }
34  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #737
Snippet name: Generic snippet interpreter (developing)
Eternal ID of this version: #737/1
Text MD5: 0db8195f2405e6929337dc385b976293
Author: stefan
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-08-15 01:28:51
Source code size: 836 bytes / 34 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 599 / 665
Referenced in: [show references]