@gnus.ai/upgrade-safe-transpiler-diamond
Version:
Solidity preprocessor used to generate OpenZeppelin Contracts Upgrade Safe using Diamond Pattern (EIP-2535).
17 lines • 606 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.findAllIdentifiers = void 0;
const utils_1 = require("solidity-ast/utils");
function* findAllIdentifiers(node) {
const seen = new Set();
for (const id of (0, utils_1.findAll)(['UserDefinedTypeName', 'IdentifierPath', 'Identifier'], node)) {
if ('pathNode' in id && id.pathNode !== undefined) {
seen.add(id.pathNode);
}
if (!seen.has(id)) {
yield id;
}
}
}
exports.findAllIdentifiers = findAllIdentifiers;
//# sourceMappingURL=find-all-identifiers.js.map