[IMP] compiler: improve generated compiled code

This commit is contained in:
Géry Debongnie
2021-12-22 11:33:12 +01:00
parent d160c4a628
commit e8b0f31da6
36 changed files with 939 additions and 936 deletions
@@ -22,8 +22,8 @@ exports[`t-props basic use 2`] = `
let block1 = createBlock(\`<span><block-text-0/></span>\`);
return function template(ctx, node, key = \\"\\") {
let d1 = ctx['props'].a+ctx['props'].b;
return block1([d1]);
let txt1 = ctx['props'].a+ctx['props'].b;
return block1([txt1]);
}
}"
`;
@@ -50,9 +50,9 @@ exports[`t-props t-props and other props 2`] = `
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
return function template(ctx, node, key = \\"\\") {
let d1 = ctx['props'].a;
let d2 = ctx['props'].b;
return block1([d1, d2]);
let txt1 = ctx['props'].a;
let txt2 = ctx['props'].b;
return block1([txt1, txt2]);
}
}"
`;
@@ -79,8 +79,8 @@ exports[`t-props t-props only 2`] = `
let block1 = createBlock(\`<div><block-text-0/></div>\`);
return function template(ctx, node, key = \\"\\") {
let d1 = ctx['props'].a;
return block1([d1]);
let txt1 = ctx['props'].a;
return block1([txt1]);
}
}"
`;