Use explicit this

This commit is contained in:
Joe Farebrother
2022-02-02 13:59:31 +00:00
parent f9f7a01f57
commit ca422a2186
2 changed files with 4 additions and 4 deletions

View File

@@ -495,7 +495,7 @@ class RegExpEscape extends RegExpNormalChar {
/**
* Holds if this is a unicode escape.
*/
private predicate isUnicode() { this.getText().prefix(2) = "\\u" }
private predicate isUnicode() { this.getText().matches("\\u%") }
/**
* Gets the unicode char for this escape.

View File

@@ -21,7 +21,7 @@ abstract class RegexString extends Expr {
private predicate char_set_end0(int pos) {
this.nonEscapedCharAt(pos) = "]" and
/* special case: `[]]` and `[^]]` are valid char classes. */
not char_set_start0(_, pos - 1)
not this.char_set_start0(_, pos - 1)
}
/**
@@ -64,7 +64,7 @@ abstract class RegexString extends Expr {
end = inner_end + 1 and
inner_end > inner_start and
this.char_set_end(inner_end) and
not exists(int mid | char_set_end(mid) | mid > inner_start and mid < inner_end)
not exists(int mid | this.char_set_end(mid) | mid > inner_start and mid < inner_end)
)
}
@@ -304,7 +304,7 @@ abstract class RegexString extends Expr {
// 16-bit hex value \uhhhh
this.getChar(start + 1) = "u" and end = start + 6
or
escapedBraces(start, end)
this.escapedBraces(start, end)
or
// Boundry matchers \b, \b{g}
this.getChar(start + 1) = "b" and