@danielx/civet 0.5.11 → 0.5.12

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/README.md CHANGED
@@ -195,6 +195,9 @@ Things Added that CoffeeScript didn't
195
195
  - Const assignment shorthand: `a := b` → `const a = b`, `{a, b} := c` → `const {a, b} = c`
196
196
  - `@#id` → `this.#id` shorthand for private identifiers
197
197
  - `import` shorthand: `x from ./x` → `import x from "./x"`
198
+ - Dynamic `import` shorthand: `import './x'` not at top level
199
+ (e.g. `await import './x'` or inside a function) →
200
+ `import('./x')`
198
201
  - `export` shorthand: `export x, y` → `export {x, y}`
199
202
  - Triple backtick Template Strings remove leading indentation for clarity
200
203
  - Class constructor shorthand `@( ... )`
package/dist/browser.js CHANGED
@@ -1456,8 +1456,11 @@ ${input.slice(result.pos)}
1456
1456
  }
1457
1457
  }
1458
1458
  var ArgumentList$0 = $S(ArgumentPart, $P($S(__, Comma, $C(NestedImplicitObjectLiteral, NestedArgumentList))));
1459
- var ArgumentList$1 = NestedArgumentList;
1460
- var ArgumentList$2 = InlineArgumentExpressions;
1459
+ var ArgumentList$1 = $TS($S(NestedImplicitObjectLiteral), function($skip, $loc, $0, $1) {
1460
+ return module.insertTrimmingSpace($1, "");
1461
+ });
1462
+ var ArgumentList$2 = NestedArgumentList;
1463
+ var ArgumentList$3 = InlineArgumentExpressions;
1461
1464
  function ArgumentList(state) {
1462
1465
  if (state.events) {
1463
1466
  const result = state.events.enter?.("ArgumentList", state);
@@ -1465,12 +1468,12 @@ ${input.slice(result.pos)}
1465
1468
  return result.cache;
1466
1469
  }
1467
1470
  if (state.tokenize) {
1468
- const result = $TOKEN("ArgumentList", state, ArgumentList$0(state) || ArgumentList$1(state) || ArgumentList$2(state));
1471
+ const result = $TOKEN("ArgumentList", state, ArgumentList$0(state) || ArgumentList$1(state) || ArgumentList$2(state) || ArgumentList$3(state));
1469
1472
  if (state.events)
1470
1473
  state.events.exit?.("ArgumentList", state, result);
1471
1474
  return result;
1472
1475
  } else {
1473
- const result = ArgumentList$0(state) || ArgumentList$1(state) || ArgumentList$2(state);
1476
+ const result = ArgumentList$0(state) || ArgumentList$1(state) || ArgumentList$2(state) || ArgumentList$3(state);
1474
1477
  if (state.events)
1475
1478
  state.events.exit?.("ArgumentList", state, result);
1476
1479
  return result;
@@ -2664,8 +2667,8 @@ ${input.slice(result.pos)}
2664
2667
  return result;
2665
2668
  }
2666
2669
  }
2667
- var CallExpression$0 = $S($EXPECT($L10, fail, 'CallExpression "super"'), ArgumentsWithTrailingCallExpressions);
2668
- var CallExpression$1 = $S($EXPECT($L11, fail, 'CallExpression "import"'), __, OpenParen, ExtendedExpression, __, CloseParen);
2670
+ var CallExpression$0 = $S($EXPECT($L10, fail, 'CallExpression "super"'), ArgumentsWithTrailingCallExpressions, $Q(CallExpressionRest));
2671
+ var CallExpression$1 = $S($EXPECT($L11, fail, 'CallExpression "import"'), ArgumentsWithTrailingCallExpressions, $Q(CallExpressionRest));
2669
2672
  var CallExpression$2 = $TS($S(MemberExpression, $Q(CallExpressionRest)), function($skip, $loc, $0, $1, $2) {
2670
2673
  if ($2.length)
2671
2674
  return $0;
@@ -9213,7 +9216,7 @@ ${input.slice(result.pos)}
9213
9216
  return result;
9214
9217
  }
9215
9218
  }
9216
- var _$0 = $P($C(NonNewlineWhitespace, Comment));
9219
+ var _$0 = $P($C(NonNewlineWhitespace, InlineComment));
9217
9220
  function _(state) {
9218
9221
  if (state.events) {
9219
9222
  const result = state.events.enter?.("_", state);
package/dist/main.js CHANGED
@@ -1455,8 +1455,11 @@ ${input.slice(result.pos)}
1455
1455
  }
1456
1456
  }
1457
1457
  var ArgumentList$0 = $S(ArgumentPart, $P($S(__, Comma, $C(NestedImplicitObjectLiteral, NestedArgumentList))));
1458
- var ArgumentList$1 = NestedArgumentList;
1459
- var ArgumentList$2 = InlineArgumentExpressions;
1458
+ var ArgumentList$1 = $TS($S(NestedImplicitObjectLiteral), function($skip, $loc, $0, $1) {
1459
+ return module2.insertTrimmingSpace($1, "");
1460
+ });
1461
+ var ArgumentList$2 = NestedArgumentList;
1462
+ var ArgumentList$3 = InlineArgumentExpressions;
1460
1463
  function ArgumentList(state) {
1461
1464
  if (state.events) {
1462
1465
  const result = state.events.enter?.("ArgumentList", state);
@@ -1464,12 +1467,12 @@ ${input.slice(result.pos)}
1464
1467
  return result.cache;
1465
1468
  }
1466
1469
  if (state.tokenize) {
1467
- const result = $TOKEN("ArgumentList", state, ArgumentList$0(state) || ArgumentList$1(state) || ArgumentList$2(state));
1470
+ const result = $TOKEN("ArgumentList", state, ArgumentList$0(state) || ArgumentList$1(state) || ArgumentList$2(state) || ArgumentList$3(state));
1468
1471
  if (state.events)
1469
1472
  state.events.exit?.("ArgumentList", state, result);
1470
1473
  return result;
1471
1474
  } else {
1472
- const result = ArgumentList$0(state) || ArgumentList$1(state) || ArgumentList$2(state);
1475
+ const result = ArgumentList$0(state) || ArgumentList$1(state) || ArgumentList$2(state) || ArgumentList$3(state);
1473
1476
  if (state.events)
1474
1477
  state.events.exit?.("ArgumentList", state, result);
1475
1478
  return result;
@@ -2663,8 +2666,8 @@ ${input.slice(result.pos)}
2663
2666
  return result;
2664
2667
  }
2665
2668
  }
2666
- var CallExpression$0 = $S($EXPECT($L10, fail, 'CallExpression "super"'), ArgumentsWithTrailingCallExpressions);
2667
- var CallExpression$1 = $S($EXPECT($L11, fail, 'CallExpression "import"'), __, OpenParen, ExtendedExpression, __, CloseParen);
2669
+ var CallExpression$0 = $S($EXPECT($L10, fail, 'CallExpression "super"'), ArgumentsWithTrailingCallExpressions, $Q(CallExpressionRest));
2670
+ var CallExpression$1 = $S($EXPECT($L11, fail, 'CallExpression "import"'), ArgumentsWithTrailingCallExpressions, $Q(CallExpressionRest));
2668
2671
  var CallExpression$2 = $TS($S(MemberExpression, $Q(CallExpressionRest)), function($skip, $loc, $0, $1, $2) {
2669
2672
  if ($2.length)
2670
2673
  return $0;
@@ -9212,7 +9215,7 @@ ${input.slice(result.pos)}
9212
9215
  return result;
9213
9216
  }
9214
9217
  }
9215
- var _$0 = $P($C(NonNewlineWhitespace, Comment));
9218
+ var _$0 = $P($C(NonNewlineWhitespace, InlineComment));
9216
9219
  function _(state) {
9217
9220
  if (state.events) {
9218
9221
  const result = state.events.enter?.("_", state);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danielx/civet",
3
- "version": "0.5.11",
3
+ "version": "0.5.12",
4
4
  "description": "CoffeeScript style syntax for TypeScript",
5
5
  "main": "dist/main.js",
6
6
  "exports": {