mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
JavaScript: Distinguish {lo} and {lo,} in the regular expression parser.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
| tst.js:1:2:1:5 | a{1} | 1 | 1 |
|
||||
| tst.js:2:2:2:6 | a{1,} | 1 | <none> |
|
||||
| tst.js:3:2:3:7 | a{1,5} | 1 | 5 |
|
||||
| tst.js:4:2:4:6 | a{,5} | 0 | 5 |
|
||||
7
javascript/ql/test/library-tests/RegExp/Bounds/Bounds.ql
Normal file
7
javascript/ql/test/library-tests/RegExp/Bounds/Bounds.ql
Normal file
@@ -0,0 +1,7 @@
|
||||
import javascript
|
||||
|
||||
from RegExpRange rr, string lb, string ub
|
||||
where
|
||||
lb = rr.getLowerBound().toString() and
|
||||
if exists(rr.getUpperBound()) then ub = rr.getUpperBound().toString() else ub = "<none>"
|
||||
select rr, lb, ub
|
||||
4
javascript/ql/test/library-tests/RegExp/Bounds/tst.js
Normal file
4
javascript/ql/test/library-tests/RegExp/Bounds/tst.js
Normal file
@@ -0,0 +1,4 @@
|
||||
/a{1}/;
|
||||
/a{1,}/;
|
||||
/a{1,5}/;
|
||||
/a{,5}/;
|
||||
Reference in New Issue
Block a user