Skip to content

Commit

Permalink
add Racket
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Cairns committed Nov 3, 2021
1 parent 863924d commit 8c9b8c0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,7 @@
[submodule "vendor/tree-sitter-clojure"]
path = vendor/tree-sitter-clojure
url = https://github.com/sogaiu/tree-sitter-clojure.git
[submodule "vendor/tree-sitter-racket"]
path = vendor/tree-sitter-racket
url = https://github.com/tautologico/tree-sitter-racket.git
shallow = true
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ all = [
"ocaml",
"php",
"python",
"racket",
"ruby",
"rust",
"scala",
Expand All @@ -62,6 +63,7 @@ julia = []
ocaml = []
php = []
python = []
racket = []
ruby = []
rust = []
scala = []
Expand Down
2 changes: 2 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ fn main() {
"php",
#[cfg(feature = "python")]
"python",
#[cfg(feature = "racket")]
"racket",
#[cfg(feature = "ruby")]
"ruby",
#[cfg(feature = "rust")]
Expand Down
4 changes: 4 additions & 0 deletions src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ extern "C" {
fn tree_sitter_php() -> Language;
#[cfg(feature = "python")]
fn tree_sitter_python() -> Language;
#[cfg(feature = "racket")]
fn tree_sitter_racket() -> Language;
#[cfg(feature = "ruby")]
fn tree_sitter_ruby() -> Language;
#[cfg(feature = "rust")]
Expand Down Expand Up @@ -81,6 +83,8 @@ pub fn filetype_to_language(filetype: &str) -> Option<Language> {
"php" => tree_sitter_php,
#[cfg(feature = "python")]
"python" => tree_sitter_python,
#[cfg(feature = "racket")]
"racket" => tree_sitter_racket,
#[cfg(feature = "ruby")]
"ruby" => tree_sitter_ruby,
#[cfg(feature = "rust")]
Expand Down
1 change: 1 addition & 0 deletions vendor/tree-sitter-racket
Submodule tree-sitter-racket added at a3e089

0 comments on commit 8c9b8c0

Please sign in to comment.