* Traverses a Babel AST and calls the supplied callback with function name * mappings, one at a time.
( ast: BabelNode, context: ?Context, pushMapping: RangeMapping => void, )
| 211 | * mappings, one at a time. |
| 212 | */ |
| 213 | function forEachMapping( |
| 214 | ast: BabelNode, |
| 215 | context: ?Context, |
| 216 | pushMapping: RangeMapping => void, |
| 217 | ) { |
| 218 | const visitor = getFunctionMapVisitor(context, pushMapping); |
| 219 | |
| 220 | traverse(ast, { |
| 221 | // Our visitor doesn't care about scope |
| 222 | noScope: true, |
| 223 | |
| 224 | Function: visitor, |
| 225 | Program: visitor, |
| 226 | Class: visitor, |
| 227 | }); |
| 228 | } |
| 229 | |
| 230 | const ANONYMOUS_NAME = '<anonymous>'; |
| 231 |
no test coverage detected
searching dependent graphs…