File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,6 +83,11 @@ class AMDModuleDefinition extends CallExpr {
8383 )
8484 }
8585
86+ /** Gets a source node whose value becomes the definition of this module. */
87+ DataFlow:: SourceNode getAModuleSource ( ) {
88+ result .flowsToExpr ( getModuleExpr ( ) )
89+ }
90+
8691 /**
8792 * Holds if `p` is the parameter corresponding to dependency `dep`.
8893 */
Original file line number Diff line number Diff line change 1- | a.js:1:1:3:2 | define( ... 2 };\\n}) | a.js:2:12:2:22 | { foo: 42 } |
2- | dir/b.js:1:1:3:2 | define( ... : 42\\n}) | dir/b.js:1:8:3:1 | {\\n bar: 42\\n} |
3- | tst.js:1:1:6:2 | define( ... };\\n}) | tst.js:2:12:5:5 | {\\n ... r\\n } |
4- | umd.js:4:9:4:43 | define( ... actory) | umd.js:10:12:13:5 | {\\n ... r\\n } |
1+ | a.js:1:1:3:2 | define( ... 2 };\\n}) | a.js:2:12:2:22 | { foo: 42 } | a.js:2:12:2:22 | { foo: 42 } |
2+ | dir/b.js:1:1:3:2 | define( ... : 42\\n}) | dir/b.js:1:8:3:1 | {\\n bar: 42\\n} | dir/b.js:1:8:3:1 | {\\n bar: 42\\n} |
3+ | tst.js:1:1:6:2 | define( ... };\\n}) | tst.js:2:12:5:5 | {\\n ... r\\n } | tst.js:2:12:5:5 | {\\n ... r\\n } |
4+ | umd.js:4:9:4:43 | define( ... actory) | umd.js:10:12:13:5 | {\\n ... r\\n } | umd.js:10:12:13:5 | {\\n ... r\\n } |
Original file line number Diff line number Diff line change 11import javascript
22
33from AMDModuleDefinition d
4- select d , d .getModuleExpr ( )
4+ select d , d .getModuleExpr ( ) , d . getAModuleSource ( )
You can’t perform that action at this time.
0 commit comments