Skip to content

Commit afbb319

Browse files
authored
Merge pull request #85 from lewis6991/cport
Port scanner.cc to C
2 parents 6138ee0 + e313871 commit afbb319

File tree

8 files changed

+1869
-1850
lines changed

8 files changed

+1869
-1850
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ can be found in the `tree-sitter-markdown-inline` folder. Components that are
3030
parts of either grammar can be found in the `common` folder.
3131

3232
For either of the grammar the most important files are the `grammar.js` which
33-
defines most nodes and the `src/scanner.cc` which defines nodes that cannot
33+
defines most nodes and the `src/scanner.c` which defines nodes that cannot
3434
be parsed with normal tree-sitter rules. All other files in the `src` subfolder
3535
are auto-generated by running `tree-sitter generate --no-bindings`. (You need to
3636
install the [tree-sitter cli tool][tree-sitter-cli] first.)

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let package = Package(
1818
],
1919
sources: [
2020
"src/parser.c",
21-
"src/scanner.cc",
21+
"src/scanner.c",
2222
],
2323
resources: [
2424
.copy("queries")
@@ -33,7 +33,7 @@ let package = Package(
3333
],
3434
sources: [
3535
"src/parser.c",
36-
"src/scanner.cc",
36+
"src/scanner.c",
3737
],
3838
resources: [
3939
.copy("queries")

binding.gyp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
],
1010
"sources": [
1111
"tree-sitter-markdown/src/parser.c",
12-
"tree-sitter-markdown/src/scanner.cc",
12+
"tree-sitter-markdown/src/scanner.c",
1313
"tree-sitter-markdown-inline/src/parser.c",
14-
"tree-sitter-markdown-inline/src/scanner.cc",
14+
"tree-sitter-markdown-inline/src/scanner.c",
1515
"bindings/node/binding.cc"
1616
],
1717
"cflags_c": [

bindings/rust/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn main() {
3030
cpp_config
3131
.flag_if_supported("-Wno-unused-parameter")
3232
.flag_if_supported("-Wno-unused-but-set-variable");
33-
let scanner_path = src_dir_block.join("scanner.cc");
33+
let scanner_path = src_dir_block.join("scanner.c");
3434
cpp_config.file(&scanner_path);
3535
cpp_config.compile("scanner_block");
3636
println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());
@@ -41,7 +41,7 @@ fn main() {
4141
cpp_config
4242
.flag_if_supported("-Wno-unused-parameter")
4343
.flag_if_supported("-Wno-unused-but-set-variable");
44-
let scanner_path = src_dir_inline.join("scanner.cc");
44+
let scanner_path = src_dir_inline.join("scanner.c");
4545
cpp_config.file(&scanner_path);
4646
cpp_config.compile("scanner_inline");
4747
println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());

0 commit comments

Comments
 (0)