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

Method isClassTypeNode

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

* Whether `node` is a class to extract: one of the language's class types, * except a TS/JS class expression without a name (`register(class extends * Base {…})`), which is passed over as before (#2499).

(node: SyntaxNode, nodeType: string)

Source from the content-addressed store, hash-verified

2725 * Base {…})`), which is passed over as before (#2499).
2726 */
2727 private isClassTypeNode(node: SyntaxNode, nodeType: string): boolean {
2728 if (!this.extractor!.classTypes.includes(nodeType)) return false;
2729 return nodeType !== 'class' || !CLASS_EXPRESSION_LANGUAGES.has(this.language) || !!getChildByField(node, 'name');
2730 }
2731
2732 private extractClass(node: SyntaxNode, kind: NodeKind = 'class'): void {
2733 if (!this.extractor) return;

Callers 2

dispatchNodeMethod · 0.95

Calls 2

getChildByFieldFunction · 0.90
hasMethod · 0.80

Tested by

no test coverage detected