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

Function innerDeclarator

src/extraction/languages/c-cpp.ts:66–68  ·  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

64
65/** What a declarator's next part is: a field where the grammar gives one, the first named child where it doesn't. */
66function innerDeclarator(declarator: SyntaxNode): SyntaxNode | null {
67 return getChildByField(declarator, 'declarator') ?? declarator.namedChild(0);
68}
69
70/**
71 * 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