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

Method isClassTypeNode

src/extraction/tree-sitter.ts:2844–2847  ·  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

2842 * Base {…})`), which is passed over as before (#2499).
2843 */
2844 private isClassTypeNode(node: SyntaxNode, nodeType: string): boolean {
2845 if (!this.extractor!.classTypes.includes(nodeType)) return false;
2846 return nodeType !== 'class' || !CLASS_EXPRESSION_LANGUAGES.has(this.language) || !!getChildByField(node, 'name');
2847 }
2848
2849 private extractClass(node: SyntaxNode, kind: NodeKind = 'class'): void {
2850 if (!this.extractor) return;

Callers 2

dispatchNodeMethod · 0.95

Calls 2

getChildByFieldFunction · 0.90
hasMethod · 0.80

Tested by

no test coverage detected