Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b6c1c17

Browse files
committed
JS: Deabstractify RegExpTerm classes
1 parent e0bdc77 commit b6c1c17

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

javascript/ql/src/semmle/javascript/Regexp.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class RegExpParent extends Locatable, @regexpparent { }
3434
* $
3535
* ```
3636
*/
37-
abstract class RegExpTerm extends Locatable, @regexpterm {
37+
class RegExpTerm extends Locatable, @regexpterm {
3838
override Location getLocation() { hasLocation(this, result) }
3939

4040
/** Gets the `i`th child term of this term. */
@@ -61,7 +61,7 @@ abstract class RegExpTerm extends Locatable, @regexpterm {
6161
string getRawValue() { regexpterm(this, _, _, _, result) }
6262

6363
/** Holds if this regular expression term can match the empty string. */
64-
abstract predicate isNullable();
64+
predicate isNullable() { none() } // Overridden in subclasses.
6565

6666
/** Gets the regular expression term that is matched before this one, if any. */
6767
RegExpTerm getPredecessor() {
@@ -123,7 +123,7 @@ abstract class RegExpTerm extends Locatable, @regexpterm {
123123
* ((ECMA|Java)[sS]cript)*
124124
* ```
125125
*/
126-
abstract class RegExpQuantifier extends RegExpTerm, @regexp_quantifier {
126+
class RegExpQuantifier extends RegExpTerm, @regexp_quantifier {
127127
/** Holds if the quantifier of this term is a greedy quantifier. */
128128
predicate isGreedy() { isGreedy(this) }
129129
}
@@ -139,7 +139,7 @@ abstract class RegExpQuantifier extends RegExpTerm, @regexp_quantifier {
139139
* \w
140140
* ```
141141
*/
142-
abstract class RegExpEscape extends RegExpTerm, @regexp_escape { }
142+
class RegExpEscape extends RegExpTerm, @regexp_escape { }
143143

144144
/**
145145
* A constant regular expression term, that is, a regular expression

0 commit comments

Comments
 (0)