Skip to content

feat: Multi-language AST parsing using Tree-Sitter #32

Description

@CodeMaverick-143

Feature Request

Replace Python-only AST parsing with tree-sitter to enable real AST metric collection across multiple programming languages.

Problem with Current Implementation

The README claims: "Analyze 30+ programming, web, and configuration file types... Collect static metrics: Functions, classes, imports".
In reality, ast.parse() only runs on .py files. For TypeScript, JavaScript, Go, Rust, Java, C++, C#, Ruby, PHP, and others, function and class counts are always 0, and imports are always [].

Proposed Solution

Integrate tree-sitter (via tree-sitter-languages or PyPI tree-sitter bindings) to parse:

  • JavaScript / TypeScript (function_declaration, class_declaration, import_statement)
  • Go (function_declaration, method_declaration, type_declaration, import_declaration)
  • Rust (fn_item, struct_item, impl_item, use_declaration)
  • Java / C++ / C# (method_declaration, class_declaration)
  • Python (FunctionDef, AsyncFunctionDef, ClassDef, Import, ImportFrom)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions