ast_path


Description:

public string ast_path (Node node, string code_content)

Build AST path from a TreeSitter node by traversing up the AST tree.

Creates a hierarchical path representing the element's location in the AST by walking up the parent chain to find namespace and class declarations. Format: namespace-class-method or namespace-outerclass-innerclass-method etc. (using '-' separator).

Parameters:

node

TreeSitter node for the element

code_content

Source code content for text extraction

Returns:

AST path string (e.g., "OLLMvector.Indexing-OuterClass-InnerClass-methodName")