public static Serializable compileExpression(char[] expression, int start, int offset, ParserContext ctx) { ExpressionCompiler c = new ExpressionCompiler(expression, start, offset, ctx); return optimizeTree(c._compile()); }
public static Serializable subCompileExpression(char[] expression, int start, int offset, ParserContext ctx) { ExpressionCompiler c = new ExpressionCompiler(expression, start, offset, ctx); return _optimizeTree(c._compile()); }
public static Serializable compileExpression(char[] expression, int start, int offset, ParserContext ctx) { ExpressionCompiler c = new ExpressionCompiler(expression, start, offset, ctx); return optimizeTree(c._compile()); }
public static Serializable subCompileExpression(char[] expression, ParserContext ctx) { ExpressionCompiler c = new ExpressionCompiler(expression, ctx); return _optimizeTree(c._compile()); }
public static Serializable subCompileExpression(char[] expression, ParserContext ctx) { ExpressionCompiler c = new ExpressionCompiler(expression, ctx); return _optimizeTree(c._compile()); }
public static Serializable subCompileExpression(char[] expression, int start, int offset, ParserContext ctx) { ExpressionCompiler c = new ExpressionCompiler(expression, start, offset, ctx); return _optimizeTree(c._compile()); }
public static Serializable subCompileExpression(String expression, ParserContext ctx) { ExpressionCompiler c = new ExpressionCompiler(expression, ctx); return _optimizeTree(c._compile()); }
public static Serializable subCompileExpression(char[] expression) { return _optimizeTree(new ExpressionCompiler(expression)._compile()); }
public static Serializable subCompileExpression(String expression, ParserContext ctx) { ExpressionCompiler c = new ExpressionCompiler(expression, ctx); return _optimizeTree(c._compile()); }
public static Serializable subCompileExpression(char[] expression) { return _optimizeTree(new ExpressionCompiler(expression)._compile()); }
public static Serializable subCompileExpression(char[] expression) { return _optimizeTree(new ExpressionCompiler(expression)._compile()); }
public static Serializable subCompileExpression(char[] expression, ParserContext ctx) { ExpressionCompiler c = new ExpressionCompiler(expression); if (ctx != null) c.setPCtx(ctx); return _optimizeTree(c._compile()); }
public static Serializable subCompileExpression(String expression, ParserContext ctx) { ExpressionCompiler c = new ExpressionCompiler(expression); c.setPCtx(ctx); return _optimizeTree(c._compile()); }
public CompiledExpression compile() { try { this.debugSymbols = pCtx.isDebugSymbols(); return _compile(); } finally { if (pCtx.isFatalError()) { StringAppender err = new StringAppender(); Iterator<ErrorDetail> iter = pCtx.getErrorList().iterator(); ErrorDetail e; while (iter.hasNext()) { e = iter.next(); e = ErrorUtil.rewriteIfNeeded(e, expr, cursor); if (e.getExpr() != expr) { iter.remove(); } else { err.append("\n - ").append("(").append(e.getLineNumber()).append(",").append(e.getColumn()).append(")") .append(" ").append(e.getMessage()); } } //noinspection ThrowFromFinallyBlock throw new CompileException("Failed to compileShared: " + pCtx.getErrorList().size() + " compilation error(s): " + err.toString(), pCtx.getErrorList(), expr, cursor, pCtx); } } }
public CompiledExpression compile() { try { this.debugSymbols = pCtx.isDebugSymbols(); return _compile(); } finally { if (pCtx.isFatalError()) { StringAppender err = new StringAppender(); Iterator<ErrorDetail> iter = pCtx.getErrorList().iterator(); ErrorDetail e; while (iter.hasNext()) { e = iter.next(); e = ErrorUtil.rewriteIfNeeded(e, expr, cursor); if (e.getExpr() != expr) { iter.remove(); } else { err.append("\n - ").append("(").append(e.getLineNumber()).append(",").append(e.getColumn()).append(")") .append(" ").append(e.getMessage()); } } //noinspection ThrowFromFinallyBlock throw new CompileException("Failed to compileShared: " + pCtx.getErrorList().size() + " compilation error(s): " + err.toString(), pCtx.getErrorList(), expr, cursor, pCtx); } } }
@Deprecated /** * @deprecated use {@link org.mvel2.MVEL#compileExpression(String, org.mvel2.ParserContext)} instead. * @param ctx * @return compile payload. */ public CompiledExpression compile(ParserContext ctx) { try { this.debugSymbols = (this.pCtx = ctx).isDebugSymbols(); newContext(ctx); return _compile(); } finally { //noinspection ThrowFromFinallyBlock removeContext(); if (pCtx.isFatalError()) { contextControl(REMOVE, null, null); StringAppender err = new StringAppender(); for (ErrorDetail e : pCtx.getErrorList()) { err.append("\n - ").append("(").append(e.getRow()).append(",").append(e.getCol()).append(")") .append(" ").append(e.getMessage()); } //noinspection ThrowFromFinallyBlock throw new CompileException("Failed to compile: " + pCtx.getErrorList().size() + " compilation error(s): " + err.toString(), pCtx.getErrorList()); } } }
if (compiled == null) { ExpressionCompiler subCompiler = new ExpressionCompiler(expr, tk.getStart(), tk.getOffset(), pCtx); compiled = subCompiler._compile(); rt = subCompiler.getReturnType(); cec.put(key, compiled);
if (compiled == null) { ExpressionCompiler subCompiler = new ExpressionCompiler(expr, tk.getStart(), tk.getOffset(), pCtx); compiled = subCompiler._compile(); rt = subCompiler.getReturnType(); cec.put(key, compiled);
tk.setAccessor(subCompiler._compile());