mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-22 00:31:17 +00:00
refactor: improve arity-metadata readability per review feedback
Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/ddcbc075-2999-492c-a0ac-47cddd401a4b Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com>
This commit is contained in:
parent
14c4639c36
commit
7eec92fe13
1 changed files with 2 additions and 1 deletions
|
|
@ -29,7 +29,8 @@ export function computeCDeclarationArity(node: SyntaxNode): CArityInfo {
|
|||
// (void) means zero parameters
|
||||
if (params.length === 1 && params[0].type === 'parameter_declaration') {
|
||||
const typeNode = params[0].childForFieldName?.('type');
|
||||
if (typeNode !== null && typeNode !== undefined && typeNode.text === 'void' && params[0].childForFieldName?.('declarator') === null) {
|
||||
const hasDeclarator = params[0].childForFieldName?.('declarator') !== null;
|
||||
if (typeNode != null && typeNode.text === 'void' && !hasDeclarator) {
|
||||
return { parameterCount: 0, requiredParameterCount: 0, parameterTypes: [] };
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue