@danielx/civet 0.6.11 → 0.6.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/dist/browser.js +16 -7
- package/dist/main.js +16 -7
- package/dist/main.mjs +16 -7
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -664,12 +664,12 @@ var Civet = (() => {
|
|
|
664
664
|
} else {
|
|
665
665
|
endIndex = i + 1;
|
|
666
666
|
}
|
|
667
|
-
results
|
|
667
|
+
results.push(first, ...binops.slice(start, endIndex).flat());
|
|
668
668
|
first = [exp].concat(binops.slice(index + 1, endIndex));
|
|
669
669
|
start = endIndex;
|
|
670
670
|
});
|
|
671
671
|
} else {
|
|
672
|
-
results
|
|
672
|
+
results.push(first, ...binops.slice(start, i + 1).flat());
|
|
673
673
|
start = i + 1;
|
|
674
674
|
}
|
|
675
675
|
chains.length = 0;
|
|
@@ -1586,11 +1586,20 @@ var Civet = (() => {
|
|
|
1586
1586
|
});
|
|
1587
1587
|
break;
|
|
1588
1588
|
}
|
|
1589
|
-
case "ConditionFragment":
|
|
1589
|
+
case "ConditionFragment": {
|
|
1590
|
+
let { children } = pattern;
|
|
1591
|
+
if (children.length) {
|
|
1592
|
+
let [first, ...rest] = children;
|
|
1593
|
+
let [ws, ...op] = first;
|
|
1594
|
+
ws = [" "].concat(ws);
|
|
1595
|
+
first = [ws, ...op];
|
|
1596
|
+
children = [first, ...rest];
|
|
1597
|
+
}
|
|
1590
1598
|
conditions.push(
|
|
1591
|
-
[ref,
|
|
1599
|
+
processBinaryOpExpression([ref, children])
|
|
1592
1600
|
);
|
|
1593
1601
|
break;
|
|
1602
|
+
}
|
|
1594
1603
|
case "RegularExpressionLiteral": {
|
|
1595
1604
|
conditions.push(
|
|
1596
1605
|
["typeof ", ref, " === 'string'"],
|
|
@@ -8210,7 +8219,7 @@ ${input.slice(result.pos)}
|
|
|
8210
8219
|
return {
|
|
8211
8220
|
type: "BlockStatement",
|
|
8212
8221
|
expressions,
|
|
8213
|
-
children: [$1, expressions, $
|
|
8222
|
+
children: [$1, $2, expressions, $3, $4],
|
|
8214
8223
|
bare: false,
|
|
8215
8224
|
empty: true
|
|
8216
8225
|
};
|
|
@@ -8278,8 +8287,8 @@ ${input.slice(result.pos)}
|
|
|
8278
8287
|
return result;
|
|
8279
8288
|
}
|
|
8280
8289
|
}
|
|
8281
|
-
var Block$0 =
|
|
8282
|
-
var Block$1 =
|
|
8290
|
+
var Block$0 = ImplicitNestedBlock;
|
|
8291
|
+
var Block$1 = ExplicitBlock;
|
|
8283
8292
|
var Block$2 = ThenClause;
|
|
8284
8293
|
var Block$3 = $TS($S($E(_), $N(EOS), Statement), function($skip, $loc, $0, $1, $2, $3) {
|
|
8285
8294
|
var ws = $1;
|
package/dist/main.js
CHANGED
|
@@ -663,12 +663,12 @@ var require_lib = __commonJS({
|
|
|
663
663
|
} else {
|
|
664
664
|
endIndex = i + 1;
|
|
665
665
|
}
|
|
666
|
-
results
|
|
666
|
+
results.push(first, ...binops.slice(start, endIndex).flat());
|
|
667
667
|
first = [exp].concat(binops.slice(index + 1, endIndex));
|
|
668
668
|
start = endIndex;
|
|
669
669
|
});
|
|
670
670
|
} else {
|
|
671
|
-
results
|
|
671
|
+
results.push(first, ...binops.slice(start, i + 1).flat());
|
|
672
672
|
start = i + 1;
|
|
673
673
|
}
|
|
674
674
|
chains.length = 0;
|
|
@@ -1585,11 +1585,20 @@ var require_lib = __commonJS({
|
|
|
1585
1585
|
});
|
|
1586
1586
|
break;
|
|
1587
1587
|
}
|
|
1588
|
-
case "ConditionFragment":
|
|
1588
|
+
case "ConditionFragment": {
|
|
1589
|
+
let { children } = pattern;
|
|
1590
|
+
if (children.length) {
|
|
1591
|
+
let [first, ...rest] = children;
|
|
1592
|
+
let [ws, ...op] = first;
|
|
1593
|
+
ws = [" "].concat(ws);
|
|
1594
|
+
first = [ws, ...op];
|
|
1595
|
+
children = [first, ...rest];
|
|
1596
|
+
}
|
|
1589
1597
|
conditions.push(
|
|
1590
|
-
[ref,
|
|
1598
|
+
processBinaryOpExpression([ref, children])
|
|
1591
1599
|
);
|
|
1592
1600
|
break;
|
|
1601
|
+
}
|
|
1593
1602
|
case "RegularExpressionLiteral": {
|
|
1594
1603
|
conditions.push(
|
|
1595
1604
|
["typeof ", ref, " === 'string'"],
|
|
@@ -8209,7 +8218,7 @@ ${input.slice(result.pos)}
|
|
|
8209
8218
|
return {
|
|
8210
8219
|
type: "BlockStatement",
|
|
8211
8220
|
expressions,
|
|
8212
|
-
children: [$1, expressions, $
|
|
8221
|
+
children: [$1, $2, expressions, $3, $4],
|
|
8213
8222
|
bare: false,
|
|
8214
8223
|
empty: true
|
|
8215
8224
|
};
|
|
@@ -8277,8 +8286,8 @@ ${input.slice(result.pos)}
|
|
|
8277
8286
|
return result;
|
|
8278
8287
|
}
|
|
8279
8288
|
}
|
|
8280
|
-
var Block$0 =
|
|
8281
|
-
var Block$1 =
|
|
8289
|
+
var Block$0 = ImplicitNestedBlock;
|
|
8290
|
+
var Block$1 = ExplicitBlock;
|
|
8282
8291
|
var Block$2 = ThenClause;
|
|
8283
8292
|
var Block$3 = $TS($S($E(_), $N(EOS), Statement), function($skip, $loc, $0, $1, $2, $3) {
|
|
8284
8293
|
var ws = $1;
|
package/dist/main.mjs
CHANGED
|
@@ -661,12 +661,12 @@ var require_lib = __commonJS({
|
|
|
661
661
|
} else {
|
|
662
662
|
endIndex = i + 1;
|
|
663
663
|
}
|
|
664
|
-
results
|
|
664
|
+
results.push(first, ...binops.slice(start, endIndex).flat());
|
|
665
665
|
first = [exp].concat(binops.slice(index + 1, endIndex));
|
|
666
666
|
start = endIndex;
|
|
667
667
|
});
|
|
668
668
|
} else {
|
|
669
|
-
results
|
|
669
|
+
results.push(first, ...binops.slice(start, i + 1).flat());
|
|
670
670
|
start = i + 1;
|
|
671
671
|
}
|
|
672
672
|
chains.length = 0;
|
|
@@ -1583,11 +1583,20 @@ var require_lib = __commonJS({
|
|
|
1583
1583
|
});
|
|
1584
1584
|
break;
|
|
1585
1585
|
}
|
|
1586
|
-
case "ConditionFragment":
|
|
1586
|
+
case "ConditionFragment": {
|
|
1587
|
+
let { children } = pattern;
|
|
1588
|
+
if (children.length) {
|
|
1589
|
+
let [first, ...rest] = children;
|
|
1590
|
+
let [ws, ...op] = first;
|
|
1591
|
+
ws = [" "].concat(ws);
|
|
1592
|
+
first = [ws, ...op];
|
|
1593
|
+
children = [first, ...rest];
|
|
1594
|
+
}
|
|
1587
1595
|
conditions.push(
|
|
1588
|
-
[ref,
|
|
1596
|
+
processBinaryOpExpression([ref, children])
|
|
1589
1597
|
);
|
|
1590
1598
|
break;
|
|
1599
|
+
}
|
|
1591
1600
|
case "RegularExpressionLiteral": {
|
|
1592
1601
|
conditions.push(
|
|
1593
1602
|
["typeof ", ref, " === 'string'"],
|
|
@@ -8207,7 +8216,7 @@ ${input.slice(result.pos)}
|
|
|
8207
8216
|
return {
|
|
8208
8217
|
type: "BlockStatement",
|
|
8209
8218
|
expressions,
|
|
8210
|
-
children: [$1, expressions, $
|
|
8219
|
+
children: [$1, $2, expressions, $3, $4],
|
|
8211
8220
|
bare: false,
|
|
8212
8221
|
empty: true
|
|
8213
8222
|
};
|
|
@@ -8275,8 +8284,8 @@ ${input.slice(result.pos)}
|
|
|
8275
8284
|
return result;
|
|
8276
8285
|
}
|
|
8277
8286
|
}
|
|
8278
|
-
var Block$0 =
|
|
8279
|
-
var Block$1 =
|
|
8287
|
+
var Block$0 = ImplicitNestedBlock;
|
|
8288
|
+
var Block$1 = ExplicitBlock;
|
|
8280
8289
|
var Block$2 = ThenClause;
|
|
8281
8290
|
var Block$3 = $TS($S($E(_), $N(EOS), Statement), function($skip, $loc, $0, $1, $2, $3) {
|
|
8282
8291
|
var ws = $1;
|