Commit a1b9776
committed
Adds regex length range analysis
Adds a new feature to analyze regular expressions and determine the minimum and maximum possible lengths of strings that match the regex.
This is achieved by implementing a `LengthRangeNodeVisitor` that traverses the regex's AST and calculates the length range.
This information is useful for input validation and optimization.1 parent af57e7e commit a1b9776
File tree
4 files changed
+521
-1
lines changed- src
- NodeVisitor
- tests/NodeVisitor
4 files changed
+521
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
0 commit comments