Skip to content

Commit 2dfe135

Browse files
authored
Merge pull request #659 from kuba--/doc-658/langs
Add list of currently supported languages
2 parents c533882 + d1cfaec commit 2dfe135

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

docs/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* [Schema](using-gitbase/schema.md)
1010
* [Supported syntax](using-gitbase/supported-syntax.md)
1111
* [Supported clients](using-gitbase/supported-clients.md)
12+
* [Supported languages](using-gitbase/supported-languages.md)
1213
* [Functions](using-gitbase/functions.md)
1314
* [Indexes](using-gitbase/indexes.md)
1415
* [Examples](using-gitbase/examples.md)
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Supported languages
2+
3+
Gitbase supports many programming languages depends on the use case.
4+
For instance the `language(path, [blob])` function supports all languages which [enry's package](https://github.com/src-d/enry) can autodetect.
5+
More details about aliases, groups, extensions, etc. you can find in [enry's repo](https://github.com/src-d/enry/blob/master/data/alias.go),
6+
or go directly to [linguist defines](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml).
7+
8+
If your use case requires _Universal Abstract Syntax Tree_ then most likely one of the following functions will be interesting for you:
9+
- `uast(blob, [lang, [xpath]])`
10+
- `uast_mode(mode, blob, lang)`
11+
- `uast_xpath(blob, xpath)`
12+
- `uast_extract(blob, key)`
13+
- `uast_children(blob)`
14+
15+
The _UAST_ functions support programming languages which already have implemented [babelfish](https://docs.sourced.tech/babelfish) driver.
16+
The list of currently supported languages on babelfish, you can find [here](https://docs.sourced.tech/babelfish/languages#supported-languages).
17+
Drivers which are still in development can be find [here](https://docs.sourced.tech/babelfish/languages#in-development).

0 commit comments

Comments
 (0)