@xaendar/compiler 0.7.23 → 0.7.24

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.
@@ -2925,7 +2925,10 @@ function typeCheckElement(node, parentNode, index, context) {
2925
2925
  });
2926
2926
  if (node.children.length) retVal.functionsToProcess.set(`${nodeName}Children`, { fn: {
2927
2927
  node,
2928
- parentNode,
2928
+ parentNode: {
2929
+ identifier: nodeName,
2930
+ type: "HTMLElement"
2931
+ },
2929
2932
  context
2930
2933
  } });
2931
2934
  return retVal;
@@ -2958,7 +2961,10 @@ function typeCheckFor(node, parentNode, index, compilerContext) {
2958
2961
  retVal.functionsToProcess.set(forKey, {
2959
2962
  fn: {
2960
2963
  node,
2961
- parentNode,
2964
+ parentNode: {
2965
+ identifier: forKey,
2966
+ type: "HTMLElement"
2967
+ },
2962
2968
  context: forContext
2963
2969
  },
2964
2970
  args: [`${itemsName}: typeof ${iterableExpr}`, `${counterName}: number`]
@@ -2997,7 +3003,10 @@ function typeCheckIf(node, parentNode, index, compilerContext) {
2997
3003
  retVal.code.push(`const ${ifKey} = ${resolveExpression(node.conditionNode, compilerContext, { resolver: "root" })};`);
2998
3004
  retVal.functionsToProcess.set(ifKey, { fn: {
2999
3005
  node,
3000
- parentNode,
3006
+ parentNode: {
3007
+ identifier: ifKey,
3008
+ type: "HTMLElement"
3009
+ },
3001
3010
  context: ifContext
3002
3011
  } });
3003
3012
  let alt = node.alternate;
@@ -3009,7 +3018,10 @@ function typeCheckIf(node, parentNode, index, compilerContext) {
3009
3018
  retVal.code.push(`const ${keyElseIf} = ${resolveExpression(conditionNode, compilerContext, { resolver: "root" })};`);
3010
3019
  retVal.functionsToProcess.set(keyElseIf, { fn: {
3011
3020
  node: alt,
3012
- parentNode,
3021
+ parentNode: {
3022
+ identifier: keyElseIf,
3023
+ type: "HTMLElement"
3024
+ },
3013
3025
  context: elseIfContext
3014
3026
  } });
3015
3027
  alt = alt.alternate;
@@ -3020,7 +3032,10 @@ function typeCheckIf(node, parentNode, index, compilerContext) {
3020
3032
  const keyElse = getBlockIdentifier("else", parentNode.identifier, index);
3021
3033
  retVal.functionsToProcess.set(keyElse, { fn: {
3022
3034
  node: alt,
3023
- parentNode,
3035
+ parentNode: {
3036
+ identifier: getBlockIdentifier("else", parentNode.identifier, index),
3037
+ type: "HTMLElement"
3038
+ },
3024
3039
  context: elseContext
3025
3040
  } });
3026
3041
  }
@@ -3041,7 +3056,10 @@ function typeCheckSwitch(node, parentNode, index, compilerContext) {
3041
3056
  const caseKey = caseNode.condition ? getBlockIdentifier("case", parentNode.identifier, `${index}_${i}`) : getBlockIdentifier("default", parentNode.identifier, index);
3042
3057
  retVal.functionsToProcess.set(caseKey, { fn: {
3043
3058
  node: caseNode,
3044
- parentNode,
3059
+ parentNode: {
3060
+ identifier: caseKey,
3061
+ type: "HTMLElement"
3062
+ },
3045
3063
  context: caseContext
3046
3064
  } });
3047
3065
  caseNode.condition?.forEach((condition, i) => retVal.code.push(`const ${caseKey}_${i}: typeof ${expression} = ${condition};`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaendar/compiler",
3
- "version": "0.7.23",
3
+ "version": "0.7.24",
4
4
  "description": "A library for transpiling Xaendar Templates into JavaScript code",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -16,8 +16,8 @@
16
16
  }
17
17
  },
18
18
  "dependencies": {
19
- "@xaendar/common": "0.7.23",
20
- "@xaendar/types": "0.7.23",
19
+ "@xaendar/common": "0.7.24",
20
+ "@xaendar/types": "0.7.24",
21
21
  "typescript": "^6.0.3"
22
22
  }
23
23
  }