@sigil-dev/compiler 0.5.0 → 0.6.0
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/jsr.json +1 -1
- package/package.json +1 -1
- package/src/babel/jsx/element.ts +6 -2
- package/src/babel/jsx/fragment.ts +4 -1
package/jsr.json
CHANGED
package/package.json
CHANGED
package/src/babel/jsx/element.ts
CHANGED
|
@@ -153,7 +153,8 @@ export function processElement(
|
|
|
153
153
|
seenAttrs.add(realAttr);
|
|
154
154
|
if (attrName === "use") {
|
|
155
155
|
// use={directive} or use={[directive, params]}
|
|
156
|
-
const expr = (attr.value as t.JSXExpressionContainer)
|
|
156
|
+
const expr = (attr.value as t.JSXExpressionContainer)
|
|
157
|
+
.expression as t.Expression;
|
|
157
158
|
statements.push(
|
|
158
159
|
t.expressionStatement(
|
|
159
160
|
t.callExpression(t.identifier("applyDirective"), [
|
|
@@ -335,7 +336,10 @@ export function processElement(
|
|
|
335
336
|
t.binaryExpression("===", poolLen, t.numericLiteral(0)),
|
|
336
337
|
t.expressionStatement(
|
|
337
338
|
t.callExpression(
|
|
338
|
-
t.memberExpression(
|
|
339
|
+
t.memberExpression(
|
|
340
|
+
t.identifier(varName),
|
|
341
|
+
t.identifier("append"),
|
|
342
|
+
),
|
|
339
343
|
[
|
|
340
344
|
t.callExpression(
|
|
341
345
|
t.memberExpression(
|
|
@@ -90,7 +90,10 @@ export function processFragment(
|
|
|
90
90
|
t.binaryExpression("===", poolLen, t.numericLiteral(0)),
|
|
91
91
|
t.expressionStatement(
|
|
92
92
|
t.callExpression(
|
|
93
|
-
t.memberExpression(
|
|
93
|
+
t.memberExpression(
|
|
94
|
+
t.identifier(effectiveParent),
|
|
95
|
+
t.identifier("append"),
|
|
96
|
+
),
|
|
94
97
|
[
|
|
95
98
|
t.callExpression(
|
|
96
99
|
t.memberExpression(
|