(programPath)
| 1348 | // the exported bindings as unreferenced. |
| 1349 | babel.traverse(ast, { |
| 1350 | Program(programPath) { |
| 1351 | const bodyPaths = programPath.get('body') |
| 1352 | const last = bodyPaths[bodyPaths.length - 1] |
| 1353 | if (last && last.isExportNamedDeclaration()) { |
| 1354 | last.traverse({ |
| 1355 | Identifier(identPath) { |
| 1356 | if ( |
| 1357 | identPath.parentPath.isExportSpecifier() && |
| 1358 | identPath.key === 'local' |
| 1359 | ) { |
| 1360 | refIdents.add(identPath) |
| 1361 | } |
| 1362 | }, |
| 1363 | }) |
| 1364 | } |
| 1365 | programPath.stop() |
| 1366 | }, |
| 1367 | }) |
| 1368 | } |
| 1369 |