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)
| 76 | // |
| 77 | // The limit must be at least 1. If unset, the limit will be 100. |
| 78 | func ErrorReportingLimit(limit int) Option { |
| 79 | return func(opts *options) error { |
| 80 | if limit < 1 { |
| 81 | return fmt.Errorf("error reporting limit must be at least 1: %d", limit) |
| 82 | } |
| 83 | opts.errorReportingLimit = limit |
| 84 | return nil |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | // ExpressionSizeCodePointLimit is an option which limits the maximum code point count of an |
| 89 | // expression. |
no outgoing calls