(node: SyntaxNode, source: string)
| 218 | * shares it (objc.ts), and has no kernel walker. |
| 219 | */ |
| 220 | export function unnamedTypeVariableName(node: SyntaxNode, source: string): string | undefined { |
| 221 | if (getChildByField(node, 'name')) return undefined; |
| 222 | const declaration = definingDeclaration(node); |
| 223 | if (!declaration) return undefined; |
| 224 | for (const declarator of declaration.childrenForFieldName('declarator')) { |
| 225 | const identifier = cDeclaratorIdentifier(declarator); |
| 226 | if (identifier) return getNodeText(identifier, source); |
| 227 | } |
| 228 | return undefined; |
| 229 | } |
| 230 | |
| 231 | /** |
| 232 | * Find the function NAME's `qualified_identifier` (`Foo::bar`) inside a |
no test coverage detected