solidity-docgen
Version:
Documentation generator for Solidity smart contracts.
21 lines • 728 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.execAll = void 0;
/**
* Iterates over all contiguous matches of the regular expression over the
* text. Stops as soon as the regular expression no longer matches at the
* current position.
*/
function* execAll(re, text) {
re = new RegExp(re, re.flags + (re.sticky ? '' : 'y'));
while (true) {
const match = re.exec(text);
// We break out of the loop if there is no match or if the empty string is
// matched because no progress will be made and it will loop indefinitely.
if (!match?.[0])
break;
yield match;
}
}
exports.execAll = execAll;
//# sourceMappingURL=execall.js.map
;