MaxNestedExpressions limits the number of variable and nested rule expressions during compilation. Defaults to 100 if not set.
(limit int)
| 185 | // |
| 186 | // Defaults to 100 if not set. |
| 187 | func MaxNestedExpressions(limit int) CompilerOption { |
| 188 | return func(c *compiler) error { |
| 189 | if limit <= 0 { |
| 190 | return fmt.Errorf("nested expression limit must be non-negative, non-zero value: %d", limit) |
| 191 | } |
| 192 | c.maxNestedExpressions = limit |
| 193 | return nil |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | // MatchCompiler is an interface that provides the necessary functionality for compiling the output |
| 198 | // of a match. |
no outgoing calls