An implementation that parses a regular expression into a tree of RegExpTerm
s.
Import path
import semmle.javascript.security.regexp.RegExpTreeView
Imports
javascript | Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.
|
Predicates
isDotAll | Holds if root has the s flag for multi-line matching.
|
isEscapeClass | Holds if term is an escape class representing e.g. \d . clazz is which character class it represents, e.g. “d” for \d .
|
isExcluded | Holds if the regular expression should not be considered.
|
isIgnoreCase | Holds if root has the i flag for case-insensitive matching.
|
isPossessive | Holds if term is a possessive quantifier. As javascript’s regexes do not support possessive quantifiers, this never holds, but is used by the shared library.
|
matchesAnyPrefix | Holds if the regex that term is part of is used in a way that ignores any leading prefix of the input it’s matched against. Not yet implemented for JavaScript.
|
matchesAnySuffix | Holds if the regex that term is part of is used in a way that ignores any trailing suffix of the input it’s matched against. Not yet implemented for JavaScript.
|
Aliases
Top | A program element with a location.
|