CodeQL library for JavaScript
Search

Class RegExpConstant

A constant regular expression term, that is, a regular expression term matching a single string.

Example:

abc

Import path

import javascript

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

getAPrimaryQlClass

Gets the primary QL class for the Locatable.

getConstantValue

Gets the single string this regular-expression term matches.

getValue

Gets the string matched by this constant term.

isCharacter

Holds if this constant represents a valid Unicode character (as opposed to a surrogate code point that does not correspond to a character by itself.)

isNullable

Holds if this regular expression term can match the empty string.

Inherited predicates

getAChild

Gets a child term of this term.

from RegExpTerm
getAMatchedString

Gets a string that is matched by this regular-expression term.

from RegExpTerm
getChild

Gets the ith child term of this term.

from RegExpTerm
getEndLine

Gets the line on which this element ends.

from Locatable
getFile

Gets the file this program element comes from.

from Locatable
getLastChild

Gets the last child term of this term.

from RegExpTerm
getLiteral

Gets the regular expression literal this term belongs to, if any.

from RegExpTerm
getLocation

Gets this element’s location.

from RegExpTerm
getNumChild

Gets the number of child terms of this term.

from RegExpTerm
getNumLines

Gets the number of lines covered by this element.

from Locatable
getParent

Gets the parent term of this regular expression term, or the regular expression literal if this is the root term.

from RegExpTerm
getPredecessor

Gets the regular expression term that is matched (textually) before this one, if any.

from RegExpTerm
getRawValue

Gets the raw source text of this term.

from RegExpTerm
getRootTerm

Gets the outermost term of this regular expression.

from RegExpTerm
getStartLine

Gets the line on which this element starts.

from Locatable
getSuccessor

Gets the regular expression term that is matched (textually) after this one, if any.

from RegExpTerm
isInBackwardMatchingContext

Holds if this regular term is in a backward-matching context, that is, it has an enclosing lookbehind assertions.

from RegExpTerm
isInForwardMatchingContext

Holds if this regular term is in a forward-matching context, that is, it has no enclosing lookbehind assertions.

from RegExpTerm
isPartOfRegExpLiteral

Holds if this term occurs as part of a regular expression literal.

from RegExpTerm
isPartOfStringLiteral

Holds if this term occurs as part of a string literal.

from RegExpTerm
isRootTerm

Holds if this is the root term of a regular expression.

from RegExpTerm
isUsedAsRegExp

Holds if this term is part of a regular expression literal, or a string literal that is interpreted as a regular expression.

from RegExpTerm
toString

Gets a textual representation of this element.

from RegExpTerm