Skip to content
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

Add list of currently supported languages #659

Merged
merged 1 commit into from
Dec 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* [Schema](using-gitbase/schema.md)
* [Supported syntax](using-gitbase/supported-syntax.md)
* [Supported clients](using-gitbase/supported-clients.md)
* [Supported languages](using-gitbase/supported-languages.md)
* [Functions](using-gitbase/functions.md)
* [Indexes](using-gitbase/indexes.md)
* [Examples](using-gitbase/examples.md)
Expand Down
17 changes: 17 additions & 0 deletions docs/using-gitbase/supported-languages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Supported languages

Gitbase supports many programming languages depends on the use case.
For instance the `language(path, [blob])` function supports all languages which [enry's package](https://github.com/src-d/enry) can autodetect.
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),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe all these explanations should come first, and the language list last? Because since it's very long, people may miss the distinction between enry-supported and bblfsh-supported.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'll leave just links and remove the list of all languages - WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, updated and rebased

or go directly to [linguist defines](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml).

If your use case requires _Universal Abstract Syntax Tree_ then most likely one of the following functions will be interesting for you:
- `uast(blob, [lang, [xpath]])`
- `uast_mode(mode, blob, lang)`
- `uast_xpath(blob, xpath)`
- `uast_extract(blob, key)`
- `uast_children(blob)`

The _UAST_ functions support programming languages which already have implemented [babelfish](https://docs.sourced.tech/babelfish) driver.
The list of currently supported languages on babelfish, you can find [here](https://docs.sourced.tech/babelfish/languages#supported-languages).
Drivers which are still in development can be find [here](https://docs.sourced.tech/babelfish/languages#in-development).