File tree Expand file tree Collapse file tree
javascript/ql/src/semmle/javascript Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -410,7 +410,12 @@ class BigIntLiteral extends @bigintliteral, Literal {
410410class StringLiteral extends @stringliteral, Literal {
411411 override string getStringValue ( ) { result = getValue ( ) }
412412
413- /** Gets the value of this string literal parsed as a regular expression. */
413+ /**
414+ * Gets the value of this string literal parsed as a regular expression, if possible.
415+ *
416+ * All string literals have an associated regular expression tree, provided it can
417+ * be parsed without syntax errors.
418+ */
414419 RegExpTerm asRegExp ( ) { this = result .getParent ( ) }
415420}
416421
Original file line number Diff line number Diff line change @@ -855,6 +855,9 @@ abstract class RegExpPatternSource extends DataFlow::Node {
855855 */
856856 abstract DataFlow:: SourceNode getARegExpObject ( ) ;
857857
858+ /**
859+ * Gets the root term of the regular expression parsed from this pattern.
860+ */
858861 abstract RegExpTerm getRegExpTerm ( ) ;
859862}
860863
You can’t perform that action at this time.
0 commit comments