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

Method Compile

cel/env.go:563–569  ·  view source on GitHub ↗

Compile combines the Parse and Check phases CEL program compilation to produce an Ast and associated issues. If an error is encountered during parsing the Compile step will not continue with the Check phase. If non-error issues are encountered during Parse, they may be combined with any issues disc

(txt string)

Source from the content-addressed store, hash-verified

561//
562// Note, for parse-only uses of CEL use Parse.
563func (e *Env) Compile(txt string) (*Ast, *Issues) {
564 src, err := common.NewTextSourceWithLimit(txt, e.configuredExpressionSizeLimit())
565 if err != nil {
566 return nil, ErrorAsIssues(err)
567 }
568 return e.CompileSource(src)
569}
570
571// CompileSource combines the Parse and Check phases CEL program compilation to produce an Ast and
572// associated issues.

Calls 4

CompileSourceMethod · 0.95
NewTextSourceWithLimitFunction · 0.92
ErrorAsIssuesFunction · 0.85