mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
feat: add recursion limit to parser
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
17
tests/parser/cases/expressions/recursion.yaml
Normal file
17
tests/parser/cases/expressions/recursion.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
cases:
|
||||
- note: deep-parens-over-limit
|
||||
rego: |
|
||||
package test
|
||||
x = ((((((((((((((((((((((((((((((((1))))))))))))))))))))))))))))))))
|
||||
error: "expression nesting too deep"
|
||||
skip: true
|
||||
|
||||
- note: compr-mixed-deep
|
||||
rego: |
|
||||
package test
|
||||
x = (1 + ( 2 + ( 3 + ( 4 + ((((((( [ [ 1 + (2 + ((((((((((((((((((((1))))))))))))))))))))) | true ] | true ] )))))))))))))
|
||||
error: "expression nesting too deep"
|
||||
|
||||
Reference in New Issue
Block a user