rust: Extract runtime language detection into separate crate

This patch adds a new `tree-sitter-loader` crate, which holds the CLI's
logic for finding and building local grammar definitions at runtime.
This allows other command-line tools to use this logic too!
This commit is contained in:
Douglas Creager 2021-06-09 12:51:28 -04:00
parent 162ce789bc
commit 66c30648c2
14 changed files with 117 additions and 62 deletions

6
cli/loader/README.md Normal file
View file

@ -0,0 +1,6 @@
# `tree-sitter-loader`
The `tree-sitter` command-line program will dynamically find and build grammars
at runtime, if you have cloned the grammars' repositories to your local
filesystem. This helper crate implements that logic, so that you can use it in
your own program analysis tools, as well.