Bump cel-go to v0.10.0

This commit is contained in:
Joe Betz
2022-03-07 20:47:04 -05:00
parent f93be6584e
commit 2a6b85c395
66 changed files with 3332 additions and 817 deletions

View File

@@ -142,14 +142,7 @@ var reservedIds = map[string]struct{}{
//
// Deprecated: Use NewParser().Parse() instead.
func Parse(source common.Source) (*exprpb.ParsedExpr, *common.Errors) {
return ParseWithMacros(source, AllMacros)
}
// ParseWithMacros converts a source input and macros set to a parsed expression.
//
// Deprecated: Use NewParser().Parse() instead.
func ParseWithMacros(source common.Source, macros []Macro) (*exprpb.ParsedExpr, *common.Errors) {
return mustNewParser(Macros(macros...)).Parse(source)
return mustNewParser(Macros(AllMacros...)).Parse(source)
}
type recursionError struct {
@@ -304,6 +297,7 @@ var (
)
func (p *parser) parse(expr runes.Buffer, desc string) *exprpb.Expr {
// TODO: get rid of these pools once https://github.com/antlr/antlr4/pull/3571 is in a release
lexer := lexerPool.Get().(*gen.CELLexer)
prsr := parserPool.Get().(*gen.CELParser)