@torpor/view 0.1.1 → 0.1.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,5 +1,12 @@
1
1
  # @torpor/view
2
2
 
3
+ ## 0.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 0e69292: Fix: null check
8
+ - b69fde1: Fix: replace for var names in control statements
9
+
3
10
  ## 0.1.1
4
11
 
5
12
  ### Patch Changes
package/dist/compile.cjs CHANGED
@@ -1250,7 +1250,7 @@ function buildIfNode(node, status, b) {
1250
1250
  }
1251
1251
  function buildIfBranch(node, status, b, parentName, rangeName, index) {
1252
1252
  status.imports.add("t_run_branch");
1253
- b.append(`${node.statement} {`);
1253
+ b.append(`${replaceForVarNames(node.statement, status)} {`);
1254
1254
  b.append(`t_run_branch(${rangeName}, ${index}, () => {`);
1255
1255
  buildFragment(node, status, b, parentName, "t_before");
1256
1256
  status.fragmentStack.push({
@@ -1285,7 +1285,7 @@ function buildReplaceNode(node, status, b) {
1285
1285
  }
1286
1286
  function buildReplaceBranch(node, status, b, parentName, rangeName) {
1287
1287
  status.imports.add("t_run_branch");
1288
- b.append(`${node.statement};`);
1288
+ b.append(`${replaceForVarNames(node.statement, status)};`);
1289
1289
  b.append(`t_run_branch(${rangeName}, -1, () => {`);
1290
1290
  buildFragment(node, status, b, parentName, "t_before");
1291
1291
  status.fragmentStack.push({
@@ -1344,7 +1344,7 @@ function buildSwitchNode(node, status, b) {
1344
1344
  }
1345
1345
  function buildSwitchBranch(node, status, b, parentName, rangeName, index) {
1346
1346
  status.imports.add("t_run_branch");
1347
- b.append(`${node.statement} {`);
1347
+ b.append(`${replaceForVarNames(node.statement, status)} {`);
1348
1348
  b.append(`t_run_branch(${rangeName}, ${index}, () => {`);
1349
1349
  buildFragment(node, status, b, parentName, "t_before");
1350
1350
  status.fragmentStack.push({