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

Function hasOnlyRecursionLimitErrors

fuzzing/fuzz_pratt_parser_test.go:170–181  ·  view source on GitHub ↗

hasOnlyRecursionLimitErrors returns true if all parse errors are recursion limit exceeded errors.

(errs *common.Errors)

Source from the content-addressed store, hash-verified

168
169// hasOnlyRecursionLimitErrors returns true if all parse errors are recursion limit exceeded errors.
170func hasOnlyRecursionLimitErrors(errs *common.Errors) bool {
171 if errs == nil || len(errs.GetErrors()) == 0 {
172 return false
173 }
174 for _, e := range errs.GetErrors() {
175 if !strings.Contains(e.Message, "recursion limit exceeded") &&
176 !strings.Contains(e.Message, "max recursion depth exceeded") {
177 return false
178 }
179 }
180 return true
181}
182
183// normalizeLeadingDotIdentPositions: Pratt parser records the start of a leading-dot identifier
184// (e.g., '.R') at the '.' token, whereas ANTLR records it at the identifier token following '.'.

Callers 1

FuzzPrattParserFunction · 0.85

Calls 2

GetErrorsMethod · 0.80
ContainsMethod · 0.65

Tested by

no test coverage detected