@@ -200,10 +200,13 @@ module SourceNode {
200200 /**
201201 * A data flow node that is considered a source node by default.
202202 *
203- * Currently, the following nodes are source nodes:
203+ * This includes all nodes that evaluate to a new object and all nodes whose
204+ * value is computed using non-local data flow (that is, flow between functions,
205+ * between modules, or through the heap):
206+ *
204207 * - import specifiers
205208 * - function parameters
206- * - `this` nodes
209+ * - function receivers
207210 * - property accesses
208211 * - function invocations
209212 * - global variable accesses
@@ -213,6 +216,12 @@ module SourceNode {
213216 * - array expressions
214217 * - JSX literals
215218 * - regular expression literals
219+ * - `yield` expressions
220+ * - `await` expressions
221+ * - dynamic `import` expressions
222+ * - function-bind expressions
223+ * - `function.sent` expressions
224+ * - comprehension expressions.
216225 *
217226 * This class is for internal use only and should not normally be used directly.
218227 */
@@ -227,7 +236,13 @@ module SourceNode {
227236 astNode instanceof JSXNode or
228237 astNode instanceof GlobalVarAccess or
229238 astNode instanceof ExternalModuleReference or
230- astNode instanceof RegExpLiteral
239+ astNode instanceof RegExpLiteral or
240+ astNode instanceof YieldExpr or
241+ astNode instanceof ComprehensionExpr or
242+ astNode instanceof AwaitExpr or
243+ astNode instanceof FunctionSentExpr or
244+ astNode instanceof FunctionBindExpr or
245+ astNode instanceof DynamicImportExpr
231246 )
232247 or
233248 this = DataFlow:: ssaDefinitionNode ( SSA:: definition ( any ( ImportSpecifier imp ) ) )
0 commit comments