mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-21 12:05:24 -04:00
puuyajun@huawei.com fix debugline getName function Signed-off-by: puyajun <puyajun@huawei.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user