MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / innerDeclarator

Function innerDeclarator

src/extraction/languages/c-cpp.ts:63–65  ·  view source on GitHub ↗

What a declarator's next part is: a field where the grammar gives one, the first named child where it doesn't.

(declarator: SyntaxNode)

Source from the content-addressed store, hash-verified

61
62/** What a declarator's next part is: a field where the grammar gives one, the first named child where it doesn't. */
63function innerDeclarator(declarator: SyntaxNode): SyntaxNode | null {
64 return getChildByField(declarator, 'declarator') ?? declarator.namedChild(0);
65}
66
67/**
68 * Whether a member declarator declares a member function (`Status Get(int);`,

Callers 2

declaresMemberFunctionFunction · 0.85

Calls 1

getChildByFieldFunction · 0.90

Tested by

no test coverage detected