!3898 解析AST忽略JSDoc注释

Merge pull request !3898 from Jiakai Shi/jiakai1101
This commit is contained in:
openharmony_ci 2024-11-05 04:03:20 +00:00 committed by Gitee
commit 345bd959df
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 3 additions and 3 deletions

View File

@ -1267,7 +1267,7 @@ function parseAllNode(node: ts.Node, sourceFileNode: ts.SourceFile, extendFuncti
});
}
}
node.getChildren().forEach((item: ts.Node) => parseAllNode(item, sourceFileNode, extendFunctionInfo));
ts.forEachChild(node, (child: ts.Node) => parseAllNode(child, sourceFileNode, extendFunctionInfo));
}
function isForeachAndLzayForEach(node: ts.Node): boolean {

View File

@ -826,7 +826,7 @@ function traverseExpressionNode(node: ts.Node, result: Record<string, boolean>):
result.hasQuestionToken = true;
}
if (!result.hasQuestionToken) {
node.getChildren().forEach((item: ts.Node) => traverseExpressionNode(item, result));
ts.forEachChild(node, (child: ts.Node) => traverseExpressionNode(child, result));
}
}

View File

@ -472,7 +472,7 @@ function visitAllNode(node: ts.Node, sourceFileNode: ts.SourceFile, allComponent
checkDecoratorCount(node, sourceFileNode, log);
checkDecorator(sourceFileNode, node, log, structContext, classContext, isObservedClass, isComponentV2,
isObservedV1Class, isSendableClass);
node.getChildren().forEach((item: ts.Node) => visitAllNode(item, sourceFileNode, allComponentNames, log,
ts.forEachChild(node, (child: ts.Node) => visitAllNode(child, sourceFileNode, allComponentNames, log,
structContext, classContext, isObservedClass, isComponentV2, fileQuery, isObservedV1Class, isSendableClass));
structContext = false;
classContext = false;