tree-sitter / haskell-tree-sitter

Haskell bindings for tree-sitter
149 stars 45 forks source link

bug fix for TreeSitter.Rust.getTestCorpusDir #277

Closed p-alik closed 4 years ago

p-alik commented 4 years ago

I beg your pardon for buggy PR #270. It should be fixed by this diff:

git diff TreeSitter/
diff --git a/tree-sitter-rust/TreeSitter/Rust.hs b/tree-sitter-rust/TreeSitter/Rust.hs
index 5e26006..9b9515a 100644
--- a/tree-sitter-rust/TreeSitter/Rust.hs
+++ b/tree-sitter-rust/TreeSitter/Rust.hs
@@ -14,4 +14,4 @@ getNodeTypesPath :: IO FilePath
 getNodeTypesPath = getDataFileName "vendor/tree-sitter-rust/src/node-types.json"

 getTestCorpusDir :: IO FilePath
-getTestCorpusDir = getDataFileName "vendor/tree-sitter-rust/test/corpus"
+getTestCorpusDir = getDataFileName "vendor/tree-sitter-rust/corpus"

The directory vendor/tree-sitter-rust/corpus exists:

haskell-tree-sitter $ ll tree-sitter-rust/vendor/tree-sitter-rust/corpus
total 92
drwxrwxr-x 2 palik palik  4096 Mai  2 09:34 ./
drwxrwxr-x 7 palik palik  4096 Mai  2 09:34 ../
-rw-rw-r-- 1 palik palik  1401 Mai  2 07:50 async.txt
-rw-rw-r-- 1 palik palik 34488 Mai  2 09:34 declarations.txt
-rw-rw-r-- 1 palik palik 16568 Mai  2 07:50 expressions.txt
-rw-rw-r-- 1 palik palik  2304 Mai  2 07:50 literals.txt
-rw-rw-r-- 1 palik palik  3702 Mai  2 09:34 macros.txt
-rw-rw-r-- 1 palik palik  3676 Mai  2 07:50 patterns.txt
-rw-rw-r-- 1 palik palik  1046 Mai  2 07:50 source_files.txt
-rw-rw-r-- 1 palik palik  6136 Mai  2 09:34 types.txt