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)
| 454 | // |
| 455 | // Note, for parse-only uses of CEL use Parse. |
| 456 | func (e *Env) Compile(txt string) (*Ast, *Issues) { |
| 457 | src, err := common.NewTextSourceWithLimit(txt, e.configuredExpressionSizeLimit()) |
| 458 | if err != nil { |
| 459 | return nil, ErrorAsIssues(err) |
| 460 | } |
| 461 | return e.CompileSource(src) |
| 462 | } |
| 463 | |
| 464 | // CompileSource combines the Parse and Check phases CEL program compilation to produce an Ast and |
| 465 | // associated issues. |