Skip to content

Commit 931204f

Browse files
committed
✨ feat: expand language support for ast-grep
Added optional dependencies for C, C++, C#, and Python support.
1 parent e0a3569 commit 931204f

3 files changed

Lines changed: 45 additions & 8 deletions

File tree

THIRD_PARTY_LICENSES.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10396,6 +10396,40 @@ SOFTWARE.
1039610396

1039710397
-----------
1039810398

10399+
The following npm packages may be included in this product:
10400+
10401+
- @ast-grep/lang-c@0.0.1
10402+
- @ast-grep/lang-cpp@0.0.1
10403+
- @ast-grep/lang-csharp@0.0.1
10404+
- @ast-grep/lang-python@0.0.1
10405+
- @ast-grep/setup-lang@0.0.3
10406+
10407+
These packages each contain the following license:
10408+
10409+
MIT License
10410+
10411+
Copyright (c) 2025 ast-grep
10412+
10413+
Permission is hereby granted, free of charge, to any person obtaining a copy
10414+
of this software and associated documentation files (the "Software"), to deal
10415+
in the Software without restriction, including without limitation the rights
10416+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10417+
copies of the Software, and to permit persons to whom the Software is
10418+
furnished to do so, subject to the following conditions:
10419+
10420+
The above copyright notice and this permission notice shall be included in all
10421+
copies or substantial portions of the Software.
10422+
10423+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10424+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
10425+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
10426+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
10427+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
10428+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
10429+
SOFTWARE.
10430+
10431+
-----------
10432+
1039910433
The following npm package may be included in this product:
1040010434

1040110435
- eventsource-parser@3.0.1

docs/src/content/docs/reference/scripts/ast-grep.mdx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,21 +135,20 @@ This version of `ast-grep` [supports the following built-in languages](https://a
135135
- TypeScript
136136
- Tsx
137137
- Css
138+
- C
139+
- C++
140+
- Python
141+
- C#
138142
139143
The following languages require installing an additional package:
140144
141-
- C, `@ast-grep/lang-c`
145+
- SQL, `@ast-grep/lang-sql`
146+
- Angular, `@ast-grep/lang-angular`
142147
143148
```sh
144-
npm install -D @ast-grep/lang-c
149+
npm install -D @ast-grep/lang-sql
145150
```
146151
147-
- C++, `@ast-grep/lang-cpp`
148-
- Python, `@ast-grep/lang-python`
149-
- C#, `@ast-grep/lang-csharp`
150-
- SQL, `@ast-grep/lang-sql`
151-
- Angular, `@ast-grep/lang-angular`
152-
153152
:::tip
154153
155154
If your language is not supported, go to [ast-grep langs](https://github.com/ast-grep/langs/issues), and add a request!

packages/cli/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@
8787
"zod-to-json-schema": "^3.24.5"
8888
},
8989
"optionalDependencies": {
90+
"@ast-grep/lang-c": "^0.0.1",
91+
"@ast-grep/lang-cpp": "^0.0.1",
92+
"@ast-grep/lang-csharp": "^0.0.1",
93+
"@ast-grep/lang-python": "^0.0.1",
9094
"@ast-grep/napi": "^0.36.2",
9195
"@huggingface/transformers": "3.4.0",
9296
"@lvce-editor/ripgrep": "^1.6.0",

0 commit comments

Comments
 (0)