use of org.sonar.plugins.python.api.tree.AliasedName in project sonar-python by SonarSource.
the class PythonTreeMaker method importName.
private static ImportName importName(AstNode astNode, Separators separators) {
Token importKeyword = toPyToken(astNode.getFirstChild(PythonKeyword.IMPORT).getToken());
List<AliasedName> aliasedNames = astNode.getFirstChild(PythonGrammar.DOTTED_AS_NAMES).getChildren(PythonGrammar.DOTTED_AS_NAME).stream().map(PythonTreeMaker::aliasedName).collect(Collectors.toList());
return new ImportNameImpl(importKeyword, aliasedNames, separators);
}
Aggregations