From 56066a279c33154171b0edff999885b1c1339899 Mon Sep 17 00:00:00 2001 From: Craig Condon Date: Sun, 10 Sep 2023 14:29:27 -0600 Subject: [PATCH] update readme --- libs/proto_ext/src/ast/pc-utils.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libs/proto_ext/src/ast/pc-utils.ts b/libs/proto_ext/src/ast/pc-utils.ts index c7b26a32c..82c9136f5 100644 --- a/libs/proto_ext/src/ast/pc-utils.ts +++ b/libs/proto_ext/src/ast/pc-utils.ts @@ -11,6 +11,7 @@ import { Document, DocumentBodyItem, Element, + Script, Import, Insert, Node, @@ -44,6 +45,7 @@ export namespace ast { Variant, Document, Render, + Script, Import, TextNode, Trigger, @@ -69,6 +71,7 @@ export namespace ast { | BaseExprInfo | BaseExprInfo | BaseExprInfo + | BaseExprInfo | BaseExprInfo | BaseExprInfo | BaseExprInfo @@ -208,6 +211,12 @@ export namespace ast { kind: ExprKind.Render, }; } + if ((expr as ComponentBodyItem).script) { + return { + expr: (expr as ComponentBodyItem).script, + kind: ExprKind.Script, + }; + } if ((expr as ComponentBodyItem).variant) { return { expr: (expr as ComponentBodyItem).variant, @@ -241,6 +250,8 @@ export namespace ast { }; } + console.error(expr); + throw new Error(`Unhandled type`); };