MCPcopy Create free account
hub / github.com/cel-expr/cel-go / AstToParsedExpr

Function AstToParsedExpr

cel/io.go:114–119  ·  view source on GitHub ↗

AstToParsedExpr converts an Ast to an protobuf ParsedExpr value.

(a *Ast)

Source from the content-addressed store, hash-verified

112
113// AstToParsedExpr converts an Ast to an protobuf ParsedExpr value.
114func AstToParsedExpr(a *Ast) (*exprpb.ParsedExpr, error) {
115 return &exprpb.ParsedExpr{
116 Expr: a.Expr(),
117 SourceInfo: a.SourceInfo(),
118 }, nil
119}
120
121// AstToString converts an Ast back to a string if possible.
122//

Callers 5

ProcessMethod · 0.92
TestAstToProtoFunction · 0.85
TestAstToParsedExprNilFunction · 0.85

Calls 2

ExprMethod · 0.65
SourceInfoMethod · 0.45

Tested by 4

TestAstToProtoFunction · 0.68
TestAstToParsedExprNilFunction · 0.68