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

Skip to content

Commit 2242df9

Browse files
committed
JS: More qldoc
1 parent dc6c15c commit 2242df9

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

javascript/ql/src/semmle/javascript/Expr.qll

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,12 @@ class BigIntLiteral extends @bigintliteral, Literal {
410410
class 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

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)