File tree Expand file tree Collapse file tree
javascript/ql/src/semmle/javascript/dataflow Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -530,6 +530,24 @@ class ArrayLiteralNode extends DataFlow::ValueNode, DataFlow::SourceNode {
530530 int getSize ( ) { result = astNode .getSize ( ) }
531531}
532532
533+ /**
534+ * A data-flow node corresponding to a regular-expression literal.
535+ *
536+ * Examples:
537+ * ```js
538+ * /https?/i
539+ * ```
540+ */
541+ class RegExpLiteralNode extends DataFlow:: ValueNode , DataFlow:: SourceNode {
542+ override RegExpLiteral astNode ;
543+
544+ /** Holds if this regular expression has a `g` flag. */
545+ predicate isGlobal ( ) { astNode .isGlobal ( ) }
546+
547+ /** Gets the root term of this regular expression. */
548+ RegExpTerm getRoot ( ) { result = astNode .getRoot ( ) }
549+ }
550+
533551/**
534552 * A data flow node corresponding to a `new Array()` or `Array()` invocation.
535553 *
You can’t perform that action at this time.
0 commit comments