[IMP] compiler: improve generated compiled code

This commit is contained in:
Géry Debongnie
2021-12-22 11:33:12 +01:00
committed by Aaron Bohy
parent bd5637c0a3
commit c7af885f43
36 changed files with 939 additions and 936 deletions
@@ -19,8 +19,8 @@ exports[`basics basic use 2`] = `
let block1 = createBlock(\`<span>child<block-text-0/></span>\`);
return function template(ctx, node, key = \\"\\") {
let d1 = ctx['props'].p;
return block1([d1]);
let txt1 = ctx['props'].p;
return block1([txt1]);
}
}"
`;
@@ -132,9 +132,9 @@ exports[`basics sub widget is interactive 2`] = `
let block1 = createBlock(\`<span><button block-handler-0=\\"click\\">click</button>child<block-text-1/></span>\`);
return function template(ctx, node, key = \\"\\") {
let d1 = [ctx['inc'], ctx];
let d2 = ctx['state'].val;
return block1([d1, d2]);
let hdlr1 = [ctx['inc'], ctx];
let txt2 = ctx['state'].val;
return block1([hdlr1, txt2]);
}
}"
`;