meriyah 4.3.8 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4374,7 +4374,9 @@ System.register('meriyah', [], (function (exports) {
4374
4374
  !specDeviation) {
4375
4375
  report(parser, 28, KeywordDescTable[parser.token & 255]);
4376
4376
  }
4377
- consumeOpt(parser, context, 1074790417);
4377
+ if (!consumeOpt(parser, context, 1074790417)) {
4378
+ parser.onInsertedSemicolon?.(parser.startPos);
4379
+ }
4378
4380
  }
4379
4381
  function isValidStrictMode(parser, index, tokenPos, tokenValue) {
4380
4382
  if (index - tokenPos < 13 && tokenValue === 'use strict') {
@@ -4716,7 +4718,7 @@ System.register('meriyah', [], (function (exports) {
4716
4718
  report(parser, 0);
4717
4719
  }
4718
4720
 
4719
- function create(source, sourceFile, onComment, onToken) {
4721
+ function create(source, sourceFile, onComment, onToken, onInsertedSemicolon) {
4720
4722
  return {
4721
4723
  source,
4722
4724
  flags: 0,
@@ -4742,12 +4744,14 @@ System.register('meriyah', [], (function (exports) {
4742
4744
  destructible: 0,
4743
4745
  onComment,
4744
4746
  onToken,
4747
+ onInsertedSemicolon,
4745
4748
  leadingDecorators: []
4746
4749
  };
4747
4750
  }
4748
4751
  function parseSource(source, options, context) {
4749
4752
  let sourceFile = '';
4750
4753
  let onComment;
4754
+ let onInsertedSemicolon;
4751
4755
  let onToken;
4752
4756
  if (options != null) {
4753
4757
  if (options.module)
@@ -4785,11 +4789,13 @@ System.register('meriyah', [], (function (exports) {
4785
4789
  if (options.onComment != null) {
4786
4790
  onComment = Array.isArray(options.onComment) ? pushComment(context, options.onComment) : options.onComment;
4787
4791
  }
4792
+ if (options.onInsertedSemicolon != null)
4793
+ onInsertedSemicolon = options.onInsertedSemicolon;
4788
4794
  if (options.onToken != null) {
4789
4795
  onToken = Array.isArray(options.onToken) ? pushToken(context, options.onToken) : options.onToken;
4790
4796
  }
4791
4797
  }
4792
- const parser = create(source, sourceFile, onComment, onToken);
4798
+ const parser = create(source, sourceFile, onComment, onToken, onInsertedSemicolon);
4793
4799
  if (context & 1)
4794
4800
  skipHashBang(parser);
4795
4801
  const scope = context & 64 ? createScope() : void 0;
@@ -5315,7 +5321,7 @@ System.register('meriyah', [], (function (exports) {
5315
5321
  consume(parser, context | 32768, 67174411);
5316
5322
  const test = parseExpressions(parser, context, 0, 1, parser.tokenPos, parser.linePos, parser.colPos);
5317
5323
  consume(parser, context | 32768, 16);
5318
- consumeOpt(parser, context, 1074790417);
5324
+ consumeOpt(parser, context | 32768, 1074790417);
5319
5325
  return finishNode(parser, context, start, line, column, {
5320
5326
  type: 'DoWhileStatement',
5321
5327
  body,
@@ -8829,7 +8835,7 @@ System.register('meriyah', [], (function (exports) {
8829
8835
  });
8830
8836
  exports('ESTree', estree);
8831
8837
 
8832
- var version$1 = "4.3.8";
8838
+ var version$1 = "4.4.0";
8833
8839
 
8834
8840
  const version = exports('version', version$1);
8835
8841
  function parseScript(source, options) {