MaxNestedExpressions limits the number of variable and nested rule expressions during compilation. Defaults to 100 if not set.
(limit int)
| 199 | // |
| 200 | // Defaults to 100 if not set. |
| 201 | func MaxNestedExpressions(limit int) CompilerOption { |
| 202 | return func(c *compiler) error { |
| 203 | if limit <= 0 { |
| 204 | return fmt.Errorf("nested expression limit must be non-negative, non-zero value: %d", limit) |
| 205 | } |
| 206 | c.maxNestedExpressions = limit |
| 207 | return nil |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | // MatchCompiler is an interface that provides the necessary functionality for compiling the output |
| 212 | // of a match. |
no outgoing calls