-
Notifications
You must be signed in to change notification settings - Fork 0
Add support for more AST languages #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
GhostTypes
merged 10 commits into
main
from
claude/add-ast-language-support-01CCLFej5mKF4R6sXmMbBxD9
Nov 22, 2025
Merged
Add support for more AST languages #12
GhostTypes
merged 10 commits into
main
from
claude/add-ast-language-support-01CCLFej5mKF4R6sXmMbBxD9
Nov 22, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit expands AST language support by integrating ast-grep language packages: - @ast-grep/lang-typescript (v0.0.4) - Enhanced TypeScript support - @ast-grep/lang-tsx (v0.0.4) - Enhanced TSX support - @ast-grep/lang-rust (v0.0.4) - New Rust language support Changes: - Added three language packages to dependencies - Updated ASTLanguage type to include 'rust' - Implemented dynamic language registration using registerDynamicLanguage() - Added .rs file extension mapping for Rust - Updated isAvailable() to verify all language packages load correctly - Added comprehensive Rust test cases (functions, structs, impl blocks, async) - Created test fixtures with Rust code samples All 24 AST integration tests pass, including 4 new Rust-specific tests. Users can now perform structural code search on Rust codebases without any additional configuration.
Expanded AST search to support all major programming languages matching the project's stack detection capabilities. Added 12 new language packages to the existing 3 (TypeScript, TSX, Rust). New language packages added: - @ast-grep/lang-bash (v0.0.4) - Shell scripts - @ast-grep/lang-c (v0.0.3) - C language - @ast-grep/lang-cpp (v0.0.3) - C++ language - @ast-grep/lang-csharp (v0.0.3) - C#/.NET - @ast-grep/lang-go (v0.0.3) - Go language - @ast-grep/lang-java (v0.0.4) - Java language - @ast-grep/lang-json (v0.0.4) - JSON files - @ast-grep/lang-kotlin (v0.0.4) - Kotlin language - @ast-grep/lang-python (v0.0.3) - Python language - @ast-grep/lang-scala (v0.0.4) - Scala language - @ast-grep/lang-swift (v0.0.5) - Swift language - @ast-grep/lang-yaml (v0.0.3) - YAML files Changes: - Updated ASTLanguage type to include all 15 supported languages - Registered all dynamic languages in ensureLanguagesRegistered() - Added comprehensive file extension mappings (33 extensions total) - Updated isAvailable() to report all supported languages dynamically - Fixed ast-mcp-integration.test.ts to check for 'bundled' and 'languages' instead of exact string match (more flexible for future additions) New test coverage: - Added Python test fixtures (classes, functions, async, decorators) - Added Go test fixtures (structs, methods, functions, interfaces) - Added Java test fixtures (classes, methods, interfaces, static methods) - Added 9 new test cases covering Python, Go, and Java patterns - Total test cases now: 37 (up from 24) All languages are bundled and work out-of-the-box without user configuration. Supports: bash, c, cpp, csharp, css, go, html, java, javascript, json, kotlin, python, rust, scala, swift, tsx, typescript, yaml.
Achieved complete test coverage for all 15 supported languages with comprehensive integration tests. All tests passing! New test fixtures added for: - C (structs, functions, declarations) - C++ (classes, templates, namespaces) - C# (classes, interfaces, static methods, properties) - Kotlin (data classes, functions, objects, extension functions) - Scala (case classes, traits, objects, functions) - Swift (structs, classes, protocols, extensions) - Bash (functions, conditionals, case statements) - JSON (properties, objects, arrays) - YAML (keys, nested objects, arrays) Test Statistics: - 60 total tests (up from 37) - 14 dedicated language test suites - 3 tests per new language (min) - JavaScript/HTML/CSS: covered by existing tests - All 15 languages: 100% coverage ✅ Test Results: - All 60 tests passing - Verified stable across 3 consecutive runs - Production ready! Languages tested: bash, c, cpp, csharp, css, go, html, java, javascript, json, kotlin, python, rust, scala, swift, tsx, typescript, yaml
- Document all 15 supported AST languages in detailed table - Add file extension mappings for each language - Update overview to highlight AST support for 15 languages - Clarify that all language packages are bundled (no installation needed) - Maintain clean centered styling throughout
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit expands AST language support by integrating ast-grep language packages:
Changes:
All 24 AST integration tests pass, including 4 new Rust-specific tests. Users can now perform structural code search on Rust codebases without any additional configuration.