feat: Add Ruby bare method call extraction for identifier nodes
Addresses Ruby bare method calls like `reset` that parse as identifier nodes instead of call expressions. Adds extractBareCall hook to detect statement-level identifiers that represent method calls, filtering out keywords, literals, and constants. Enables proper call relationship tracking for Ruby's parentheses-optional method syntax.
This commit is contained in:
@@ -198,4 +198,12 @@ export interface LanguageExtractor {
|
||||
* structural nodes (classes, structs, enums).
|
||||
*/
|
||||
isMisparsedFunction?: (name: string, node: SyntaxNode) => boolean;
|
||||
|
||||
/**
|
||||
* Detect bare method calls that don't use call expression syntax.
|
||||
* Used by Ruby where `reset` (no parens, no receiver) is a method call but
|
||||
* tree-sitter parses it as a plain `identifier` node instead of `call`/`method_call`.
|
||||
* Returns the callee name if this node is a bare call, or undefined if not.
|
||||
*/
|
||||
extractBareCall?: (node: SyntaxNode, source: string) => string | undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user