mirror of
https://github.com/github/codeql.git
synced 2026-07-31 15:33:00 +02:00
- ParseRegExp.qll:
- specialCharacter: remove \A, \Z, \z, \G (Ruby-only anchors); keep only \b, \B
- firstPart: remove \A arm; keep only ^ for start-of-string
- lastPart: remove \Z, \z arms; keep only $ for end-of-string
- nonCapturingGroupStart: remove < from char set (handled by namedGroupStart
and lookbehindAssertionStart; was causing mis-tokenization of lookbehind)
- namedGroupStart: remove Ruby-only single-quote (?'name'...) branch; keep
only ECMAScript (?<name>...) syntax
- RegexTreeView.qll:
- RegExpCharacterClassEscape: remove h, H (Ruby hex-digit classes); keep
d, D, s, S, w, W (ECMAScript set)
- RegExpAnchor: change to [^, $] only (remove \A, \Z, \z)
- RegExpDollar: change to $ only (remove \Z, \z)
- RegExpCaret: change to ^ only (remove \A)
- test.cpp:
- r_cc3: replace \A[+-]?\d+ with ^[+-]?\d+ (ECMAScript caret)
- r_meta5 \h\H: removed (Ruby-only hex classes)
- r_anc1 \Gabc: removed (\G not in ECMAScript)
- Regenerated parse.expected and regexp.expected via codeql test run --learn
(CodeQL 2.26.1); all 2 tests pass.