Skip to content

Commit

Permalink
Move grammars to grammars directory (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
314eter authored Mar 16, 2024
1 parent 712d9bf commit d8c1d99
Show file tree
Hide file tree
Showing 40 changed files with 728 additions and 1,938 deletions.
20 changes: 12 additions & 8 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
/interface/src/parser.c linguist-generated
/interface/src/grammar.json linguist-generated
/interface/src/node-types.json linguist-generated
/interface/src/tree_sitter/* linguist-vendored
/ocaml/src/parser.c linguist-generated
/ocaml/src/grammar.json linguist-generated
/ocaml/src/node-types.json linguist-generated
/ocaml/src/tree_sitter/* linguist-vendored
* text eol=lf

grammars/interface/src/*.json linguist-generated
grammars/interface/src/parser.c linguist-generated

grammars/ocaml/src/*.json linguist-generated
grammars/ocaml/src/parser.c linguist-generated

include/tree_sitter/* linguist-vendored

bindings/** linguist-generated
binding.gyp linguist-generated
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Package.resolved

# These files would be generated by 'tree-sitter generate' with the default
# settings. We don't want them because there's already a copy at the root.
/interface/Cargo.toml
/interface/binding.gyp
/interface/bindings
/ocaml/Cargo.toml
/ocaml/binding.gyp
/ocaml/bindings
grammars/interface/Cargo.toml
grammars/interface/binding.gyp
grammars/interface/bindings
grammars/ocaml/Cargo.toml
grammars/ocaml/binding.gyp
grammars/ocaml/bindings
12 changes: 7 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ edition = "2018"

build = "bindings/rust/build.rs"
include = [
"common/*",
"bindings/rust/*",
"ocaml/grammar.js",
"ocaml/src/*",
"interface/grammar.js",
"interface/src/*",
"grammars/ocaml/grammar.js",
"grammars/ocaml/src/*.c",
"grammars/ocaml/src/*.json",
"grammars/interface/grammar.js",
"grammars/interface/src/*.c",
"grammars/interface/src/*.json",
"include/*",
"queries/*"
]

Expand Down
11 changes: 6 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ let package = Package(
name: "TreeSitterOCaml",
path: ".",
sources: [
"interface/src/parser.c",
"interface/src/scanner.c",
"ocaml/src/parser.c",
"ocaml/src/scanner.c",
"grammars/interface/src/parser.c",
"grammars/interface/src/scanner.c",
"grammars/ocaml/src/parser.c",
"grammars/ocaml/src/scanner.c",
"include",
],
resources: [
.copy("queries")
],
publicHeadersPath: "bindings/swift",
cSettings: [.headerSearchPath("ocaml/src")]
cSettings: [.headerSearchPath("include")]
),
.testTarget(
name: "TreeSitterOCamlTests",
Expand Down
10 changes: 5 additions & 5 deletions binding.gyp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions bindings/node/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions bindings/rust/build.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions bindings/rust/lib.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions grammars/interface/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"main": "../../bindings/node/interface"
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
Loading

0 comments on commit d8c1d99

Please sign in to comment.