Skip to content

Commit ba4d2ff

Browse files
fix: remove use other language section in napi
fix #659
1 parent 388cc86 commit ba4d2ff

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

website/guide/api-usage/js-api.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,7 @@ See also [ast-grep#1172](https://github.com/ast-grep/ast-grep/issues/1172)
306306

307307
## Use Other Language
308308

309-
To access other languages, you can use the `parse`/`parseAsync` function and the `Lang` enum.
309+
To access other languages, you will need to use `registerDynamicLanguage` function and probably `@ast-grep/lang-*` package.
310+
This is an experimental feature and the doc is not ready yet. Please refer to the [repo](https://github.com/ast-grep/langs) for more information.
310311

311-
**Example**
312-
313-
```js
314-
import { parse, Lang } from '@ast-grep/napi'
315-
316-
const sg = parse(Lang.Python, 'def test(): pass')
317-
318-
console.log(sg.root().has('function_definition'))
319-
```
312+
If you are interested in using other languages, please let us know by creating an issue.

0 commit comments

Comments
 (0)