@gi-tcg/gts-transpiler 0.4.5 → 0.4.6

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/dist/index.js CHANGED
@@ -1449,10 +1449,7 @@ const insertHintStatement = (state, whiteSpaceStart, whiteSpaceEnd) => {
1449
1449
  whiteSpaceStart,
1450
1450
  whiteSpaceEnd
1451
1451
  });
1452
- exitAttr(state, {
1453
- type: "Identifier",
1454
- name: `__gts_attrRet_hint_${state.idCounter++}`
1455
- });
1452
+ `${state.idCounter++}`;
1456
1453
  };
1457
1454
  const gtsToTypingsWalker = {
1458
1455
  Program(node, { state, visit }) {
@@ -1720,7 +1717,6 @@ const gtsToTypingsWalker = {
1720
1717
  }
1721
1718
  }]
1722
1719
  });
1723
- exitAttr(state, returnValue);
1724
1720
  }
1725
1721
  return EMPTY;
1726
1722
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gi-tcg/gts-transpiler",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/piovium/gts.git"
@@ -273,7 +273,7 @@ const insertHintStatement = (
273
273
  type: "Identifier",
274
274
  name: `__gts_attrRet_hint_${state.idCounter++}`,
275
275
  };
276
- exitAttr(state, returnValue);
276
+ // do NOT exitAttr (rewrite meta) since hint is a incomplete structure
277
277
  };
278
278
 
279
279
  export const gtsToTypingsWalker: Visitors<Node, TypingTranspileState> = {
@@ -512,7 +512,7 @@ export const gtsToTypingsWalker: Visitors<Node, TypingTranspileState> = {
512
512
  // Insert hint statement around each attribute name:
513
513
  // ```
514
514
  // define foo {
515
- // // (1) hidden hint
515
+ // // (1) hidden hint
516
516
  // bar 1; // (2a) hidden hint
517
517
  // baz 2; // (2b) hidden hint
518
518
  // }
@@ -594,7 +594,8 @@ export const gtsToTypingsWalker: Visitors<Node, TypingTranspileState> = {
594
594
  },
595
595
  ],
596
596
  });
597
- exitAttr(state, returnValue);
597
+ // rewriting meta is unnecessary since direct action must be the last attribute
598
+ // exitAttr(state, returnValue);
598
599
  }
599
600
  return EMPTY;
600
601
  },