Skip to content

Commit

Permalink
Make grammars compile
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
heitor-lassarote committed Jun 22, 2024
1 parent bfb44b8 commit b07bd87
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion tree-sitter-nix/tree-sitter-nix.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ library tree-sitter-nix-internal
, tree-sitter
Include-dirs: vendor/tree-sitter-nix/src
c-sources: vendor/tree-sitter-nix/src/parser.c
vendor/tree-sitter-nix/src/scanner.cc
vendor/tree-sitter-nix/src/scanner.c
extra-libraries: stdc++

source-repository head
Expand Down
6 changes: 3 additions & 3 deletions tree-sitter-ocaml/TreeSitter/OCaml.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import Foreign.Ptr
import TreeSitter.Language
import Paths_tree_sitter_ocaml

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

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

getTestCorpusDir :: IO FilePath
getTestCorpusDir = getDataFileName "vendor/tree-sitter-ocaml/corpus"
getTestCorpusDir = getDataFileName "vendor/tree-sitter-ocaml/grammars/ocaml/test/corpus"
6 changes: 3 additions & 3 deletions tree-sitter-ocaml/tree-sitter-ocaml.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ library
other-modules: Paths_tree_sitter_ocaml
build-depends: base >= 4.12 && < 5
, tree-sitter ^>= 0.9.0.0
Include-dirs: vendor/tree-sitter-ocaml/src
Include-dirs: vendor/tree-sitter-ocaml/grammars/ocaml/src
install-includes: tree_sitter/parser.h
c-sources: vendor/tree-sitter-ocaml/src/parser.c
, vendor/tree-sitter-ocaml/src/scanner.cc
c-sources: vendor/tree-sitter-ocaml/grammars/ocaml/src/parser.c
, vendor/tree-sitter-ocaml/grammars/ocaml/src/scanner.c
extra-libraries: stdc++

source-repository head
Expand Down
4 changes: 2 additions & 2 deletions tree-sitter-php/TreeSitter/PHP.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Foreign.Ptr
import TreeSitter.Language
import Paths_tree_sitter_php

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

getNodeTypesPath :: IO FilePath
getNodeTypesPath = getDataFileName "vendor/tree-sitter-php/src/node-types.json"
getNodeTypesPath = getDataFileName "vendor/tree-sitter-php/php/src/node-types.json"
6 changes: 3 additions & 3 deletions tree-sitter-php/tree-sitter-php.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ library
other-modules: Paths_tree_sitter_php
build-depends: base >= 4.12 && < 5
, tree-sitter
include-dirs: vendor/tree-sitter-php/src
include-dirs: vendor/tree-sitter-php/php/src
install-includes: tree_sitter/parser.h
c-sources: vendor/tree-sitter-php/src/parser.c
, vendor/tree-sitter-php/src/scanner.cc
c-sources: vendor/tree-sitter-php/php/src/parser.c
, vendor/tree-sitter-php/php/src/scanner.c
extra-libraries: stdc++

source-repository head
Expand Down
2 changes: 1 addition & 1 deletion tree-sitter-python/tree-sitter-python.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ library
Include-dirs: vendor/tree-sitter-python/src
install-includes: tree_sitter/parser.h
c-sources: vendor/tree-sitter-python/src/parser.c
, vendor/tree-sitter-python/src/scanner.cc
, vendor/tree-sitter-python/src/scanner.c
extra-libraries: stdc++

source-repository head
Expand Down
2 changes: 1 addition & 1 deletion tree-sitter-ruby/tree-sitter-ruby.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ library
Include-dirs: vendor/tree-sitter-ruby/src
install-includes: tree_sitter/parser.h
c-sources: vendor/tree-sitter-ruby/src/parser.c
, vendor/tree-sitter-ruby/src/scanner.cc
, vendor/tree-sitter-ruby/src/scanner.c
extra-libraries: stdc++


Expand Down

0 comments on commit b07bd87

Please sign in to comment.