Skip to content

Commit b07bd87

Browse files
Make grammars compile
Problem: Note all tree-sitter-* dirs are compiling. Solution: Some of them had updated files or paths, so fix them accordingly in the Cabal file. Change their .hs files accordingly.
1 parent bfb44b8 commit b07bd87

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

tree-sitter-nix/tree-sitter-nix.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ library tree-sitter-nix-internal
5555
, tree-sitter
5656
Include-dirs: vendor/tree-sitter-nix/src
5757
c-sources: vendor/tree-sitter-nix/src/parser.c
58-
vendor/tree-sitter-nix/src/scanner.cc
58+
vendor/tree-sitter-nix/src/scanner.c
5959
extra-libraries: stdc++
6060

6161
source-repository head

tree-sitter-ocaml/TreeSitter/OCaml.hs

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import Foreign.Ptr
88
import TreeSitter.Language
99
import Paths_tree_sitter_ocaml
1010

11-
foreign import ccall unsafe "vendor/tree-sitter-ocaml/src/parser.c tree_sitter_ocaml" tree_sitter_ocaml :: Ptr Language
11+
foreign import ccall unsafe "vendor/tree-sitter-ocaml/grammars/ocaml/src/parser.c tree_sitter_ocaml" tree_sitter_ocaml :: Ptr Language
1212

1313
getNodeTypesPath :: IO FilePath
14-
getNodeTypesPath = getDataFileName "vendor/tree-sitter-ocaml/src/node-types.json"
14+
getNodeTypesPath = getDataFileName "vendor/tree-sitter-ocaml/grammars/ocaml/src/node-types.json"
1515

1616
getTestCorpusDir :: IO FilePath
17-
getTestCorpusDir = getDataFileName "vendor/tree-sitter-ocaml/corpus"
17+
getTestCorpusDir = getDataFileName "vendor/tree-sitter-ocaml/grammars/ocaml/test/corpus"

tree-sitter-ocaml/tree-sitter-ocaml.cabal

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ library
4646
other-modules: Paths_tree_sitter_ocaml
4747
build-depends: base >= 4.12 && < 5
4848
, tree-sitter ^>= 0.9.0.0
49-
Include-dirs: vendor/tree-sitter-ocaml/src
49+
Include-dirs: vendor/tree-sitter-ocaml/grammars/ocaml/src
5050
install-includes: tree_sitter/parser.h
51-
c-sources: vendor/tree-sitter-ocaml/src/parser.c
52-
, vendor/tree-sitter-ocaml/src/scanner.cc
51+
c-sources: vendor/tree-sitter-ocaml/grammars/ocaml/src/parser.c
52+
, vendor/tree-sitter-ocaml/grammars/ocaml/src/scanner.c
5353
extra-libraries: stdc++
5454

5555
source-repository head

tree-sitter-php/TreeSitter/PHP.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foreign.Ptr
77
import TreeSitter.Language
88
import Paths_tree_sitter_php
99

10-
foreign import ccall unsafe "vendor/tree-sitter-php/src/parser.c tree_sitter_php" tree_sitter_php :: Ptr Language
10+
foreign import ccall unsafe "vendor/tree-sitter-php/php/src/parser.c tree_sitter_php" tree_sitter_php :: Ptr Language
1111

1212
getNodeTypesPath :: IO FilePath
13-
getNodeTypesPath = getDataFileName "vendor/tree-sitter-php/src/node-types.json"
13+
getNodeTypesPath = getDataFileName "vendor/tree-sitter-php/php/src/node-types.json"

tree-sitter-php/tree-sitter-php.cabal

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ library
4646
other-modules: Paths_tree_sitter_php
4747
build-depends: base >= 4.12 && < 5
4848
, tree-sitter
49-
include-dirs: vendor/tree-sitter-php/src
49+
include-dirs: vendor/tree-sitter-php/php/src
5050
install-includes: tree_sitter/parser.h
51-
c-sources: vendor/tree-sitter-php/src/parser.c
52-
, vendor/tree-sitter-php/src/scanner.cc
51+
c-sources: vendor/tree-sitter-php/php/src/parser.c
52+
, vendor/tree-sitter-php/php/src/scanner.c
5353
extra-libraries: stdc++
5454

5555
source-repository head

tree-sitter-python/tree-sitter-python.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ library
5050
Include-dirs: vendor/tree-sitter-python/src
5151
install-includes: tree_sitter/parser.h
5252
c-sources: vendor/tree-sitter-python/src/parser.c
53-
, vendor/tree-sitter-python/src/scanner.cc
53+
, vendor/tree-sitter-python/src/scanner.c
5454
extra-libraries: stdc++
5555

5656
source-repository head

tree-sitter-ruby/tree-sitter-ruby.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ library
5050
Include-dirs: vendor/tree-sitter-ruby/src
5151
install-includes: tree_sitter/parser.h
5252
c-sources: vendor/tree-sitter-ruby/src/parser.c
53-
, vendor/tree-sitter-ruby/src/scanner.cc
53+
, vendor/tree-sitter-ruby/src/scanner.c
5454
extra-libraries: stdc++
5555

5656

0 commit comments

Comments
 (0)