Skip to content

Commit

Permalink
Merge pull request #85 from lewis6991/cport
Browse files Browse the repository at this point in the history
Port scanner.cc to C
  • Loading branch information
MDeiml authored Mar 2, 2023
2 parents 6138ee0 + e313871 commit afbb319
Show file tree
Hide file tree
Showing 8 changed files with 1,869 additions and 1,850 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ can be found in the `tree-sitter-markdown-inline` folder. Components that are
parts of either grammar can be found in the `common` folder.

For either of the grammar the most important files are the `grammar.js` which
defines most nodes and the `src/scanner.cc` which defines nodes that cannot
defines most nodes and the `src/scanner.c` which defines nodes that cannot
be parsed with normal tree-sitter rules. All other files in the `src` subfolder
are auto-generated by running `tree-sitter generate --no-bindings`. (You need to
install the [tree-sitter cli tool][tree-sitter-cli] first.)
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let package = Package(
],
sources: [
"src/parser.c",
"src/scanner.cc",
"src/scanner.c",
],
resources: [
.copy("queries")
Expand All @@ -33,7 +33,7 @@ let package = Package(
],
sources: [
"src/parser.c",
"src/scanner.cc",
"src/scanner.c",
],
resources: [
.copy("queries")
Expand Down
4 changes: 2 additions & 2 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
],
"sources": [
"tree-sitter-markdown/src/parser.c",
"tree-sitter-markdown/src/scanner.cc",
"tree-sitter-markdown/src/scanner.c",
"tree-sitter-markdown-inline/src/parser.c",
"tree-sitter-markdown-inline/src/scanner.cc",
"tree-sitter-markdown-inline/src/scanner.c",
"bindings/node/binding.cc"
],
"cflags_c": [
Expand Down
4 changes: 2 additions & 2 deletions bindings/rust/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fn main() {
cpp_config
.flag_if_supported("-Wno-unused-parameter")
.flag_if_supported("-Wno-unused-but-set-variable");
let scanner_path = src_dir_block.join("scanner.cc");
let scanner_path = src_dir_block.join("scanner.c");
cpp_config.file(&scanner_path);
cpp_config.compile("scanner_block");
println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());
Expand All @@ -41,7 +41,7 @@ fn main() {
cpp_config
.flag_if_supported("-Wno-unused-parameter")
.flag_if_supported("-Wno-unused-but-set-variable");
let scanner_path = src_dir_inline.join("scanner.cc");
let scanner_path = src_dir_inline.join("scanner.c");
cpp_config.file(&scanner_path);
cpp_config.compile("scanner_inline");
println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());
Expand Down
Loading

0 comments on commit afbb319

Please sign in to comment.