use of org.develnext.jphp.scripting.util.ReaderInputStream in project jphp by jphp-compiler.
the class JPHPScriptEngine method compile.
@Override
public CompiledScript compile(Reader reader) throws ScriptException {
try {
InputStream is = new ReaderInputStream(reader);
Context context = new Context(is);
ModuleEntity module = environment.importModule(context);
return new JPHPCompiledScript(module, environment);
} catch (IOException e) {
throw new ScriptException(e);
} catch (Throwable e) {
throw new ScriptException(new Exception(e));
}
}
Aggregations