[IMP] component: allow dynamic root nodes

closes #283
This commit is contained in:
Géry Debongnie
2019-09-11 11:28:41 +02:00
parent e1acf66143
commit ffb3263c79
10 changed files with 542 additions and 150 deletions
+4 -1
View File
@@ -19,7 +19,7 @@ export class Context {
shouldDefineParent: boolean = false;
shouldDefineQWeb: boolean = false;
shouldDefineUtils: boolean = false;
shouldDefineResult: boolean = false;
shouldDefineResult: boolean = true;
shouldProtectContext: boolean = false;
shouldTrackScope: boolean = false;
inLoop: boolean = false;
@@ -93,6 +93,9 @@ export class Context {
if (!this.rootContext.rootNode) {
this.rootContext.rootNode = node;
}
if (!this.parentNode) {
this.addLine(`result = vn${node};`);
}
return this.subContext("parentNode", node);
}