JS: let RegExpLiteral be a DataFlow::SourceNode

This commit is contained in:
Esben Sparre Andreasen
2019-02-28 14:07:53 +01:00
parent 76caad0fb4
commit 42d3012f81
3 changed files with 6 additions and 1 deletions

View File

@@ -211,6 +211,7 @@ module SourceNode {
* - object expressions
* - array expressions
* - JSX literals
* - regular expression literals
*
* This class is for internal use only and should not normally be used directly.
*/
@@ -224,7 +225,8 @@ module SourceNode {
astNode instanceof ArrayExpr or
astNode instanceof JSXNode or
astNode instanceof GlobalVarAccess or
astNode instanceof ExternalModuleReference
astNode instanceof ExternalModuleReference or
astNode instanceof RegExpLiteral
)
or
exists(SsaExplicitDefinition ssa, VarDef def |

View File

@@ -11,6 +11,7 @@
| sources.js:3:2:3:1 | this |
| sources.js:3:2:5:1 | functio ... x+19;\\n} |
| sources.js:3:11:3:11 | x |
| sources.js:7:1:7:3 | /x/ |
| tst.js:1:1:1:0 | this |
| tst.js:1:1:1:24 | import ... m 'fs'; |
| tst.js:1:10:1:11 | fs |

View File

@@ -3,3 +3,5 @@ new (x => x);
(function(x) {
return x+19;
})(23);
/x/;