hasOnlyRecursionLimitErrors returns true if all parse errors are recursion limit exceeded errors.
(errs *common.Errors)
| 168 | |
| 169 | // hasOnlyRecursionLimitErrors returns true if all parse errors are recursion limit exceeded errors. |
| 170 | func 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 '.'. |
no test coverage detected