pSettings.getSourceEncoding(),
false,
pSettings.isDebug()?DebuggingInformation.ALL:DebuggingInformation.NONE,
new FilterWarningHandler(pattern, new WarningHandler() {
public void handleWarning( final String pHandle, final String pMessage, final Location pLocation ) {
final CompilationProblem problem = new JaninoCompilationProblem(pLocation.getFileName(), pLocation, pMessage, false);
if (problemHandler != null) {
problemHandler.handle(problem);
}
problems.add(problem);
}
})
);
compiler.setCompileErrorHandler(new ErrorHandler() {
public void handleError( final String pMessage, final Location pLocation ) throws CompileException {
final CompilationProblem problem = new JaninoCompilationProblem(pLocation.getFileName(), pLocation, pMessage, true);
if (problemHandler != null) {
problemHandler.handle(problem);
}
problems.add(problem);
}