public static List<ExprNode> getExprNodesLibFunc(EsperEPL2GrammarParser.LibFunctionArgsContext ctx, Map<Tree, ExprNode> astExprNodeMap) {
if (ctx == null) {
return Collections.emptyList();
}
List<EsperEPL2GrammarParser.LibFunctionArgItemContext> args = ctx.libFunctionArgItem();
if (args == null || args.isEmpty()) {
return Collections.emptyList();
}
List<ExprNode> parameters = new ArrayList<ExprNode>(args.size());
for (EsperEPL2GrammarParser.LibFunctionArgItemContext arg : args) {
if (arg.expressionLambdaDecl() != null) {
List<String> lambdaparams = getLambdaGoesParams(arg.expressionLambdaDecl());
ExprLambdaGoesNode goes = new ExprLambdaGoesNode(lambdaparams);
ExprNode lambdaExpr = ASTExprHelper.exprCollectSubNodes(arg.expressionWithNamed(), 0, astExprNodeMap).get(0);
goes.addChildNode(lambdaExpr);
parameters.add(goes);
} else {
ExprNode parameter = ASTExprHelper.exprCollectSubNodes(arg.expressionWithNamed(), 0, astExprNodeMap).get(0);
parameters.add(parameter);
}
}
return parameters;
}
ASTLibFunctionHelper.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:esper
作者:
评论列表
文章目录