CompileSource combines the Parse and Check phases CEL program compilation to produce an Ast and associated issues. If an error is encountered during parsing the CompileSource step will not continue with the Check phase. If non-error issues are encountered during Parse, they may be combined with any
(src Source)
| 470 | // |
| 471 | // Note, for parse-only uses of CEL use Parse. |
| 472 | func (e *Env) CompileSource(src Source) (*Ast, *Issues) { |
| 473 | ast, iss := e.ParseSource(src) |
| 474 | if iss.Err() != nil { |
| 475 | return nil, iss |
| 476 | } |
| 477 | checked, iss2 := e.Check(ast) |
| 478 | if iss2.Err() != nil { |
| 479 | return nil, iss2 |
| 480 | } |
| 481 | return checked, iss2 |
| 482 | } |
| 483 | |
| 484 | // Extend the current environment with additional options to produce a new Env. |
| 485 | // |
no test coverage detected