MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / CreateAstFromParsedExpr

Function CreateAstFromParsedExpr

common/ast_proto.cc:464–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462} // namespace
463
464absl::StatusOr<std::unique_ptr<Ast>> CreateAstFromParsedExpr(
465 const cel::expr::Expr& expr,
466 const cel::expr::SourceInfo* source_info) {
467 CEL_ASSIGN_OR_RETURN(auto runtime_expr, ExprValueFromProto(expr));
468 SourceInfo runtime_source_info;
469 if (source_info != nullptr) {
470 CEL_ASSIGN_OR_RETURN(runtime_source_info,
471 ConvertProtoSourceInfoToNative(*source_info));
472 }
473 return std::make_unique<Ast>(std::move(runtime_expr),
474 std::move(runtime_source_info));
475}
476
477absl::StatusOr<std::unique_ptr<Ast>> CreateAstFromParsedExpr(
478 const ParsedExprPb& parsed_expr) {

Callers 6

TESTFunction · 0.70
TEST_PFunction · 0.70
TESTFunction · 0.70
PrintProtoMethod · 0.50
CheckImplFunction · 0.50
PlanMethod · 0.50

Calls 4

source_infoMethod · 0.80
CEL_ASSIGN_OR_RETURNFunction · 0.50
exprMethod · 0.45

Tested by 3

TESTFunction · 0.56
TEST_PFunction · 0.56
TESTFunction · 0.56