Skip to content

Commit

Permalink
Merge pull request #17 from BrianHicks/elm
Browse files Browse the repository at this point in the history
add Elm
  • Loading branch information
ul authored Jan 22, 2020
2 parents fe45c54 + b8dd81c commit 2fa4b12
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@
path = vendor/tree-sitter-julia
url = https://github.com/tree-sitter/tree-sitter-julia.git
shallow = true
[submodule "vendor/tree-sitter-elm"]
path = vendor/tree-sitter-elm
url = https://github.com/Razzeee/tree-sitter-elm.git
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ all = [
"c",
"cpp",
"css",
"elm",
"go",
"haskell",
"html",
Expand All @@ -48,6 +49,7 @@ c_sharp = []
c = []
cpp = []
css = []
elm = []
go = []
haskell = []
html = []
Expand Down
2 changes: 2 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ fn main() {
"cpp",
#[cfg(feature = "css")]
"css",
#[cfg(feature = "elm")]
"elm",
#[cfg(feature = "go")]
"go",
#[cfg(feature = "haskell")]
Expand Down
4 changes: 4 additions & 0 deletions src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ extern "C" {
fn tree_sitter_cpp() -> Language;
#[cfg(feature = "css")]
fn tree_sitter_css() -> Language;
#[cfg(feature = "elm")]
fn tree_sitter_elm() -> Language;
#[cfg(feature = "go")]
fn tree_sitter_go() -> Language;
#[cfg(feature = "haskell")]
Expand Down Expand Up @@ -53,6 +55,8 @@ pub fn filetype_to_language(filetype: &str) -> Option<Language> {
"cpp" => tree_sitter_cpp,
#[cfg(feature = "css")]
"css" => tree_sitter_css,
#[cfg(feature = "elm")]
"elm" => tree_sitter_elm,
#[cfg(feature = "go")]
"go" => tree_sitter_go,
#[cfg(feature = "haskell")]
Expand Down
1 change: 1 addition & 0 deletions vendor/tree-sitter-elm
Submodule tree-sitter-elm added at 37f09f

0 comments on commit 2fa4b12

Please sign in to comment.