The types a declarator names, past the type written before it: a function pointer's parameters.
(declarator: SyntaxNode, own: ReadonlySet<string>, source: string, names: CTypeName[])
| 156 | |
| 157 | /** The types a declarator names, past the type written before it: a function pointer's parameters. */ |
| 158 | function collectDeclaratorTypeNames(declarator: SyntaxNode, own: ReadonlySet<string>, source: string, names: CTypeName[]): void { |
| 159 | if (declarator.type === 'function_declarator') { |
| 160 | const parameters = getChildByField(declarator, 'parameters'); |
| 161 | if (parameters) collectCTypeNames(parameters, own, source, names); |
| 162 | } |
| 163 | if (!declarator.type.endsWith('declarator')) return; |
| 164 | const inner = innerDeclarator(declarator); |
| 165 | if (inner) collectDeclaratorTypeNames(inner, own, source, names); |
| 166 | } |
| 167 | |
| 168 | /** Collects the type names under `node` onto `names`, in source order. */ |
| 169 | function collectCTypeNames(node: SyntaxNode, own: ReadonlySet<string>, source: string, names: CTypeName[]): void { |
no test coverage detected