"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Analysis_1 = __importDefault(require("../ast/Analysis"));
function assemblyToAnalysis(root, options) {
    //  Then we extract all declarations out
    let declarations = new Map();
    for (let moduleName of root.modules.keys()) {
        let module = root.modules.get(moduleName);
        // move all declarations into the assembly declarations
        for (let statement of module.body) {
            let declaration = statement;
            // let exportName = pathFunctions.getPath(moduleName, declaration.id.name)
            // declarations.set(
            //     exportName,
            //     declaration.patch({
            //         id: declaration.id.patch({
            //             name: exportName
            //         })
            //     })
            // )
        }
    }
    //  And finally create the new Analysis scope
    return new Analysis_1.default({ declarations });
}
exports.default = assemblyToAnalysis;
