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

Method cppBodyEnd

src/extraction/tree-sitter.ts:1615–1620  ·  view source on GitHub ↗

* The textual extent of a C++ class-like body while the file is walked in * brace scopes: where the node ends (the `}` that closes its body) to pass * to createNode, or null to keep the tree's.

(body: SyntaxNode | null | undefined)

Source from the content-addressed store, hash-verified

1613 * to createNode, or null to keep the tree's.
1614 */
1615 private cppBodyEnd(body: SyntaxNode | null | undefined): Partial<Node> | null {
1616 const close = body ? this.cppBraceScopes?.closeOf(body.startIndex) : undefined;
1617 if (close === undefined) return null;
1618 const end = this.cppBraceScopes!.positionOf(close + 1);
1619 return { endLine: end.line, endColumn: end.column };
1620 }
1621
1622 /** Open a class-like node's body as a scope for visitInCppBraceScope. */
1623 private openCppClassScope(node: Node, body: SyntaxNode | null | undefined): void {

Callers 2

extractClassMethod · 0.95
extractAggregateMethod · 0.95

Calls 2

closeOfMethod · 0.80
positionOfMethod · 0.80

Tested by

no test coverage detected