Libraryless. Click here for Pure Java version (6644L/44K/149K).
1 | !7 |
2 | |
3 | p { |
4 | CompilerBot.verbose = true; |
5 | makeAndroid("Compiler bot with caching!"); |
6 | } |
7 | |
8 | static synchronized S answer(S s) { |
9 | new Matches m; |
10 | if (match3("Please compile this JavaX snippet: *", s, m)) { |
11 | S snippetID = $1; |
12 | File jar = CompilerBot.compileSnippet(snippetID); |
13 | ret "ok, " + quote(jar.getAbsolutePath()); |
14 | } |
15 | |
16 | if "Please compile this Java text: *" |
17 | ret compile($1, ""); |
18 | |
19 | if "Please compile this Java text: * with libraries *" |
20 | ret compile($1, $2); |
21 | |
22 | if (match3("Please compile this Java text: * for java version *", s, m)) { |
23 | String src = unquote(m.m[0]); |
24 | String target = unquote(m.m[1]); |
25 | return compile(src, "", target); |
26 | } |
27 | |
28 | return null; |
29 | } |
30 | |
31 | static S compile(S src, S libs) { |
32 | return compile(src, libs, null); |
33 | } |
34 | |
35 | static synchronized S compile(S src, S dehlibs, S javaTarget) { |
36 | File jar = CompilerBot.compile(src, dehlibs, javaTarget); |
37 | ret "ok, " + quote(jar.getAbsolutePath()); |
38 | } |
Began life as a copy of #1002203
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: | #1007916 |
Snippet name: | Compiler Bot using CompilerBot [LIVE in JavaX Starter] |
Eternal ID of this version: | #1007916/3 |
Text MD5: | 4780102e1ad9eae1a639734f1f69a9c7 |
Transpilation MD5: | 6ccc9468c6b8846d5222a2c140654f2a |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-13 23:52:14 |
Source code size: | 967 bytes / 38 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 622 / 2349 |
Version history: | 2 change(s) |
Referenced in: | [show references] |