From 25423aea88d1d0603c8cbc3c5ee7bc99a85db149 Mon Sep 17 00:00:00 2001 From: puyajun Date: Wed, 30 Mar 2022 16:58:15 +0800 Subject: [PATCH] fixed 5f29260 from https://gitee.com/puyajun/ace_ets_good/pulls/548 puuyajun@huawei.com fix debugline getName function Signed-off-by: puyajun --- compiler/src/process_component_build.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/src/process_component_build.ts b/compiler/src/process_component_build.ts index 6da73b2..bdc0dbd 100644 --- a/compiler/src/process_component_build.ts +++ b/compiler/src/process_component_build.ts @@ -351,8 +351,10 @@ function processInnerComponent(node: ts.ExpressionStatement, index: number, arr: const debugInfo: string = `${path.relative(projectPath, curFileName).replace(/\\+/g, '/')}` + `(${posOfNode.line + line}:${posOfNode.character + col})`; + const nameResult: NameResult = { name: null }; + validateEtsComponentNode(node.expression as ts.EtsComponentExpression, nameResult); const debugNode: ts.ExpressionStatement = ts.factory.createExpressionStatement( - createFunction(ts.factory.createIdentifier(getName(node)), + createFunction(ts.factory.createIdentifier(nameResult.name), ts.factory.createIdentifier(COMPONENT_DEBUGLINE_FUNCTION), ts.factory.createNodeArray([ts.factory.createStringLiteral(debugInfo)]))); newStatements.push(debugNode);