(programPath)
| 1338 | // the exported bindings as unreferenced. |
| 1339 | babel.traverse(ast, { |
| 1340 | Program(programPath) { |
| 1341 | const bodyPaths = programPath.get('body') |
| 1342 | const last = bodyPaths[bodyPaths.length - 1] |
| 1343 | if (last && last.isExportNamedDeclaration()) { |
| 1344 | last.traverse({ |
| 1345 | Identifier(identPath) { |
| 1346 | if ( |
| 1347 | identPath.parentPath.isExportSpecifier() && |
| 1348 | identPath.key === 'local' |
| 1349 | ) { |
| 1350 | refIdents.add(identPath) |
| 1351 | } |
| 1352 | }, |
| 1353 | }) |
| 1354 | } |
| 1355 | programPath.stop() |
| 1356 | }, |
| 1357 | }) |
| 1358 | } |
| 1359 |