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

Function classExpressionHead

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

A class expression's head, `class Widget extends Base`: its text up to the body. Mirrored in the kernel (tsjs extract_class).

(source: string, node: SyntaxNode, body: SyntaxNode)

Source from the content-addressed store, hash-verified

484
485/** A class expression's head, `class Widget extends Base`: its text up to the body. Mirrored in the kernel (tsjs extract_class). */
486function classExpressionHead(source: string, node: SyntaxNode, body: SyntaxNode): string {
487 return source.substring(node.startIndex, body.startIndex).replace(/[ \t\r\n]+$/, '');
488}
489
490/** Receiver node types (TS/JS grammars) that continue a member chain downward. */
491const TS_JS_CHAIN_RECEIVER_TYPES = new Set(['member_expression', 'subscript_expression']);

Callers 1

extractClassMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected