Module tree

Module tree 

Source
Expand description

Tree-sitter AST Tool for AGCodex

This module provides comprehensive AST parsing and querying capabilities using tree-sitter with support for multiple programming languages. It includes:

  • Multi-language parser support with automatic language detection
  • Query-based AST pattern matching
  • Semantic code diffing
  • Symbol extraction and analysis
  • Efficient caching for performance

§Supported Languages

  • Rust, Python, JavaScript, TypeScript
  • Go, Java, C, C++, Bash
  • More languages can be added via the parser registry

Structs§

DiffNode
A node in a diff
ModifiedNode
A modified node in a diff
MovedNode
A moved node in a diff
ParsedAst
Parsed AST with metadata
Point
Point in source code (row, column)
QueryCapture
A capture from a query match
QueryMatch
Query result containing matched nodes and captures
SemanticDiff
Semantic differences between two ASTs
Symbol
Symbol information extracted from AST
TreeTool
Enhanced tree-sitter tool with comprehensive language support

Enums§

SupportedLanguage
Supported programming languages (27 total)
SymbolKind
Types of symbols that can be extracted
TreeError
Errors specific to the tree tool
TreeInput
Input for tree operations
TreeOutput
Output from tree operations

Type Aliases§

TreeResult
Result type for tree operations