meriyah 6.0.0 → 6.0.2

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## [6.0.2](https://github.com/meriyah/meriyah/compare/v6.0.1...v6.0.2) (2024-10-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **parser:** all identifiers can be start of an expression ([7f800c5](https://github.com/meriyah/meriyah/commit/7f800c5fce86d71f80cb15d3a1ead5fc2d70e8ef)), closes [#342](https://github.com/meriyah/meriyah/issues/342)
7
+
8
+
9
+
10
+ ## [6.0.1](https://github.com/meriyah/meriyah/compare/v6.0.0...v6.0.1) (2024-09-16)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **scanner:** proper EOF error for unterminated template ([cde6b2f](https://github.com/meriyah/meriyah/commit/cde6b2f7db3768c0fc254e65a68aa6debea62eab))
16
+
17
+
18
+
1
19
  # [6.0.0](https://github.com/meriyah/meriyah/compare/v5.0.0...v6.0.0) (2024-09-16)
2
20
 
3
21
  ### Bug Fixes
package/README.md CHANGED
@@ -10,7 +10,8 @@
10
10
 
11
11
  <br>
12
12
 
13
- ## [Demo](https://meriyah.github.io/meriyah)
13
+ [Interactive Playground](https://meriyah.github.io/meriyah)
14
+ [Benchmark](https://meriyah.github.io/meriyah/performance)
14
15
 
15
16
  ## Features
16
17
 
@@ -117,7 +118,7 @@ The available options:
117
118
  lexical: false;
118
119
 
119
120
  // Adds a source attribute in every node’s loc object when the locations option is `true`
120
- source: false;
121
+ source: undefined; // Set to source: 'source-file.js'
121
122
 
122
123
  // Enable React JSX parsing
123
124
  jsx: false;
package/dist/meriyah.cjs CHANGED
@@ -1187,10 +1187,8 @@ function scanTemplate(parser, context) {
1187
1187
  }
1188
1188
  }
1189
1189
  }
1190
- else {
1191
- if (parser.index < parser.end &&
1192
- char === 13 &&
1193
- parser.source.charCodeAt(parser.index) === 10) {
1190
+ else if (parser.index < parser.end) {
1191
+ if (char === 13 && parser.source.charCodeAt(parser.index) === 10) {
1194
1192
  ret += String.fromCodePoint(char);
1195
1193
  parser.currentChar = parser.source.charCodeAt(++parser.index);
1196
1194
  }
@@ -1518,8 +1516,8 @@ const descKeywordTable = Object.create(null, {
1518
1516
  eval: { value: 537079926 },
1519
1517
  as: { value: 77932 },
1520
1518
  arguments: { value: 537079927 },
1521
- target: { value: 143493 },
1522
- meta: { value: 143494 },
1519
+ target: { value: 209029 },
1520
+ meta: { value: 209030 },
1523
1521
  accessor: { value: 12402 },
1524
1522
  });
1525
1523
 
@@ -1598,7 +1596,7 @@ function scanIdentifierSlowCase(parser, context, hasEscape, isValidAsKeyword) {
1598
1596
  return -2147483528;
1599
1597
  }
1600
1598
  }
1601
- return 143482 | -2147483648;
1599
+ return 209018 | -2147483648;
1602
1600
  }
1603
1601
  if (context & 67108864 &&
1604
1602
  (context & 2048) === 0 &&
@@ -1607,13 +1605,13 @@ function scanIdentifierSlowCase(parser, context, hasEscape, isValidAsKeyword) {
1607
1605
  }
1608
1606
  if (token === 241771) {
1609
1607
  return context & 67108864
1610
- ? 143482 | -2147483648
1608
+ ? 209018 | -2147483648
1611
1609
  : context & 262144
1612
1610
  ? -2147483528
1613
1611
  : token | -2147483648;
1614
1612
  }
1615
1613
  if (token === 209005) {
1616
- return 143482 | -2147483648;
1614
+ return 209018 | -2147483648;
1617
1615
  }
1618
1616
  if ((token & 36864) === 36864) {
1619
1617
  return token | 12288 | -2147483648;
@@ -6619,7 +6617,7 @@ function parseImportMetaExpression(parser, context, meta, start, line, column) {
6619
6617
  report(parser, 169);
6620
6618
  nextToken(parser, context);
6621
6619
  const token = parser.getToken();
6622
- if (token !== 143494 && parser.tokenValue !== 'meta') {
6620
+ if (token !== 209030 && parser.tokenValue !== 'meta') {
6623
6621
  report(parser, 174);
6624
6622
  }
6625
6623
  else if (token & -2147483648) {
@@ -8347,7 +8345,7 @@ function parseNewExpression(parser, context, privateScope, inGroup, start, line,
8347
8345
  const id = parseIdentifier(parser, context | 8192);
8348
8346
  const { tokenIndex, tokenLine, tokenColumn } = parser;
8349
8347
  if (consumeOpt(parser, context, 67108877)) {
8350
- if (context & 16777216 && parser.getToken() === 143493) {
8348
+ if (context & 16777216 && parser.getToken() === 209029) {
8351
8349
  parser.assignable = 2;
8352
8350
  return parseMetaProperty(parser, context, id, start, line, column);
8353
8351
  }
@@ -9229,7 +9227,7 @@ var estree = /*#__PURE__*/Object.freeze({
9229
9227
  __proto__: null
9230
9228
  });
9231
9229
 
9232
- var version = "6.0.0";
9230
+ var version = "6.0.2";
9233
9231
 
9234
9232
  function parseScript(source, options) {
9235
9233
  return parseSource(source, options, 0);