fix RegExpEscape::getValue having multiple results for some escapes

This commit is contained in:
erik-krogh
2022-09-27 13:25:23 +02:00
parent 0c79c2836c
commit 7675571daa
4 changed files with 13 additions and 4 deletions

View File

@@ -468,7 +468,9 @@ class RegExpEscape extends RegExpNormalChar {
* TODO: Handle named escapes.
*/
override string getValue() {
this.isIdentityEscape() and result = this.getUnescaped()
not this.isUnicode() and
this.isIdentityEscape() and
result = this.getUnescaped()
or
this.getUnescaped() = "n" and result = "\n"
or