mirror of
https://github.com/automazeio/ccpm.git
synced 2025-10-09 13:41:06 +03:00
Fix ast-grep supported languages list to match official documentation
Correct the ast-grep language support documentation to accurately reflect the actual 25 languages supported according to ast-grep.github.io: **Removed unsupported languages:** - Dart (not actually supported by ast-grep) - Vue, Svelte (framework-specific, not core languages) - SCSS, SASS, LESS (CSS preprocessors not supported) - TOML, XML (not in official support list) - PowerShell, shell variants beyond bash - OCaml and other languages incorrectly listed **Corrected to official 25 languages:** - System: C, C++, C#, Go, Rust - Web: JavaScript (js/jsx), TypeScript (ts), TSX, HTML, CSS, PHP - General: Python, Java, Kotlin, Ruby, Swift, Scala, Lua, Elixir, Haskell - Config: JSON, YAML - Other: Bash, Nix, Solidity **Updated examples:** - Use correct language aliases (js instead of javascript, ts instead of typescript) - Align with actual ast-grep command patterns This ensures accurate guidance for developers using ast-grep integration and prevents errors from referencing unsupported language identifiers. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -20,17 +20,17 @@ ast-grep --pattern '$PATTERN' --lang $LANGUAGE $PATH
|
||||
### Common Use Cases
|
||||
|
||||
- **Find function calls:**
|
||||
`ast-grep --pattern 'functionName($$$)' --lang javascript .`
|
||||
`ast-grep --pattern 'functionName($$$)' --lang js .`
|
||||
- **Find class definitions:**
|
||||
`ast-grep --pattern 'class $NAME { $$$ }' --lang typescript .`
|
||||
`ast-grep --pattern 'class $NAME { $$$ }' --lang ts .`
|
||||
- **Find variable assignments:**
|
||||
`ast-grep --pattern '$VAR = $$$' --lang ruby .`
|
||||
- **Find import statements:**
|
||||
`ast-grep --pattern 'import { $$$ } from "$MODULE"' --lang javascript .`
|
||||
`ast-grep --pattern 'import { $$$ } from "$MODULE"' --lang js .`
|
||||
- **Find method calls on objects:**
|
||||
`ast-grep --pattern '$OBJ.$METHOD($$$)' --lang typescript .`
|
||||
`ast-grep --pattern '$OBJ.$METHOD($$$)' --lang ts .`
|
||||
- **Find React hooks:**
|
||||
`ast-grep --pattern 'const [$STATE, $SETTER] = useState($$$)' --lang typescript .`
|
||||
`ast-grep --pattern 'const [$STATE, $SETTER] = useState($$$)' --lang tsx .`
|
||||
- **Find Ruby class definitions:**
|
||||
`ast-grep --pattern 'class $NAME < $$$; $$$; end' --lang ruby .`
|
||||
|
||||
@@ -43,42 +43,44 @@ ast-grep --pattern '$PATTERN' --lang $LANGUAGE $PATH
|
||||
|
||||
## Supported Languages
|
||||
|
||||
**Primary Languages:**
|
||||
- **JavaScript/TypeScript**: `javascript`, `typescript`, `jsx`, `tsx`
|
||||
- **Python**: `python`
|
||||
- **Java/Kotlin**: `java`, `kotlin`
|
||||
- **C/C++**: `c`, `cpp`, `c++`
|
||||
- **C#**: `csharp`, `cs`
|
||||
**Complete list of ast-grep supported languages** (25 total):
|
||||
|
||||
**System Programming:**
|
||||
- **C**: `c`
|
||||
- **C++**: `cpp`
|
||||
- **C#**: `csharp`
|
||||
- **Go**: `go`
|
||||
- **Rust**: `rust`
|
||||
- **Ruby**: `ruby`
|
||||
- **PHP**: `php`
|
||||
- **Swift**: `swift`
|
||||
- **Dart**: `dart`
|
||||
|
||||
**Web & Markup:**
|
||||
**Web Development:**
|
||||
- **JavaScript**: `javascript` (aliases: `js`, `jsx`)
|
||||
- **TypeScript**: `typescript` (aliases: `ts`)
|
||||
- **TSX**: `tsx`
|
||||
- **HTML**: `html`
|
||||
- **CSS**: `css`, `scss`, `sass`, `less`
|
||||
- **Vue**: `vue`
|
||||
- **Svelte**: `svelte`
|
||||
- **CSS**: `css`
|
||||
- **PHP**: `php`
|
||||
|
||||
**Configuration & Data:**
|
||||
- **YAML**: `yaml`, `yml`
|
||||
- **JSON**: `json`
|
||||
- **TOML**: `toml`
|
||||
- **XML**: `xml`
|
||||
|
||||
**Shell & Scripts:**
|
||||
- **Bash**: `bash`, `sh`
|
||||
- **PowerShell**: `powershell`
|
||||
|
||||
**Others:**
|
||||
**General Purpose:**
|
||||
- **Python**: `python`
|
||||
- **Java**: `java`
|
||||
- **Kotlin**: `kotlin`
|
||||
- **Ruby**: `ruby`
|
||||
- **Swift**: `swift`
|
||||
- **Scala**: `scala`
|
||||
- **Lua**: `lua`
|
||||
- **Elixir**: `elixir`
|
||||
- **Scala**: `scala`
|
||||
- **Haskell**: `haskell`
|
||||
- **OCaml**: `ocaml`
|
||||
- **And many more** - ast-grep supports 50+ languages
|
||||
|
||||
**Configuration & Data:**
|
||||
- **JSON**: `json`
|
||||
- **YAML**: `yaml`
|
||||
|
||||
**Other:**
|
||||
- **Bash**: `bash`
|
||||
- **Nix**: `nix`
|
||||
- **Solidity**: `solidity`
|
||||
|
||||
> **Note**: Language aliases (like `js` for `javascript`) and file extension mappings can be customized using the `languageGlobs` configuration.
|
||||
|
||||
## Integration Workflow
|
||||
|
||||
|
||||
Reference in New Issue
Block a user