ErrorReportingLimit limits the number of syntax error reports before terminating parsing. The limit must be at least 1. If unset, the limit will be 100.
(limit int)
| 79 | // |
| 80 | // The limit must be at least 1. If unset, the limit will be 100. |
| 81 | func ErrorReportingLimit(limit int) Option { |
| 82 | return func(opts *options) error { |
| 83 | if limit < 1 { |
| 84 | return fmt.Errorf("error reporting limit must be at least 1: %d", limit) |
| 85 | } |
| 86 | opts.errorReportingLimit = limit |
| 87 | return nil |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | // ExpressionSizeCodePointLimit is an option which limits the maximum code point count of an |
| 92 | // expression. |
no outgoing calls