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

Function ExprToString

cel/io.go:107–109  ·  view source on GitHub ↗

ExprToString converts an AST Expr node back to a string using macro call tracking metadata from source info if any macros are encountered within the expression.

(e ast.Expr, info *ast.SourceInfo)

Source from the content-addressed store, hash-verified

105// ExprToString converts an AST Expr node back to a string using macro call tracking metadata from
106// source info if any macros are encountered within the expression.
107func ExprToString(e ast.Expr, info *ast.SourceInfo) (string, error) {
108 return parser.Unparse(e, info)
109}
110
111// RefValueToValue converts between ref.Val and google.api.expr.v1alpha1.Value.
112// The result Value is the serialized proto form. The ref.Val must not be error or unknown.

Callers 3

VisitExprMethod · 0.92
AstToStringFunction · 0.85
TestExprToStringFunction · 0.85

Calls 1

UnparseFunction · 0.92

Tested by 2

VisitExprMethod · 0.74
TestExprToStringFunction · 0.68