!7 p { CompilerBot.verbose = true; makeAndroid("Compiler bot with caching!"); } static synchronized S answer(S s) { new Matches m; if (match3("Please compile this JavaX snippet: *", s, m)) { S snippetID = $1; File jar = CompilerBot.compileSnippet(snippetID); ret "ok, " + quote(jar.getAbsolutePath()); } if "Please compile this Java text: *" ret compile($1, ""); if "Please compile this Java text: * with libraries *" ret compile($1, $2); if (match3("Please compile this Java text: * for java version *", s, m)) { String src = unquote(m.m[0]); String target = unquote(m.m[1]); return compile(src, "", target); } return null; } static S compile(S src, S libs) { return compile(src, libs, null); } static synchronized S compile(S src, S dehlibs, S javaTarget) { File jar = CompilerBot.compile(src, dehlibs, javaTarget); ret "ok, " + quote(jar.getAbsolutePath()); }