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

Method Parse

cel/env.go:699–705  ·  view source on GitHub ↗

Parse parses the input expression value `txt` to a Ast and/or a set of Issues. This form of Parse creates a Source value for the input `txt` and forwards to the ParseSource method.

(txt string)

Source from the content-addressed store, hash-verified

697// This form of Parse creates a Source value for the input `txt` and forwards to the
698// ParseSource method.
699func (e *Env) Parse(txt string) (*Ast, *Issues) {
700 src, err := common.NewTextSourceWithLimit(txt, e.configuredExpressionSizeLimit())
701 if err != nil {
702 return nil, ErrorAsIssues(err)
703 }
704 return e.ParseSource(src)
705}
706
707// ParseSource parses the input source to an Ast and/or set of Issues.
708//

Callers 15

testCostFunction · 0.95
TestStringFormatFunction · 0.95
TestLiteralOutputFunction · 0.95
TestStringFormatV2Function · 0.95
TestNativeStructEmbeddedFunction · 0.95
TestNativeNestedStructFunction · 0.95
TestBindingsFunction · 0.95
TestBindingsNonMatchFunction · 0.95
TestBindingsInvalidIdentFunction · 0.95
TestStringsFunction · 0.95
evalWithCELFunction · 0.95

Calls 4

ParseSourceMethod · 0.95
NewTextSourceWithLimitFunction · 0.92
ErrorAsIssuesFunction · 0.85

Tested by 15

testCostFunction · 0.76
TestStringFormatFunction · 0.76
TestLiteralOutputFunction · 0.76
TestStringFormatV2Function · 0.76
TestNativeStructEmbeddedFunction · 0.76
TestNativeNestedStructFunction · 0.76
TestBindingsFunction · 0.76
TestBindingsNonMatchFunction · 0.76
TestBindingsInvalidIdentFunction · 0.76
TestStringsFunction · 0.76
evalWithCELFunction · 0.76