helpers.js 453 B

1234567891011
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.emitStringMatch = void 0;
  4. const emitStringMatch = (expression, offset, match) => {
  5. const conditions = [];
  6. for (let i = 0; i < match.length; i++)
  7. conditions.push(`${match.charCodeAt(i)} === ${expression}.charCodeAt(${offset} + ${i})`);
  8. return conditions.join(' && ');
  9. };
  10. exports.emitStringMatch = emitStringMatch;
  11. //# sourceMappingURL=helpers.js.map