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§
- Diff
Node - A node in a diff
- Modified
Node - A modified node in a diff
- Moved
Node - A moved node in a diff
- Parsed
Ast - Parsed AST with metadata
- Point
- Point in source code (row, column)
- Query
Capture - A capture from a query match
- Query
Match - Query result containing matched nodes and captures
- Semantic
Diff - Semantic differences between two ASTs
- Symbol
- Symbol information extracted from AST
- Tree
Tool - Enhanced tree-sitter tool with comprehensive language support
Enums§
- Supported
Language - Supported programming languages (27 total)
- Symbol
Kind - Types of symbols that can be extracted
- Tree
Error - Errors specific to the tree tool
- Tree
Input - Input for tree operations
- Tree
Output - Output from tree operations
Type Aliases§
- Tree
Result - Result type for tree operations