Skip to content

Commit

Permalink
Fix: Adds scanner to Rust project.
Browse files Browse the repository at this point in the history
  • Loading branch information
acristoffers committed Jun 17, 2023
1 parent 740dd9d commit ea30dae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tree-sitter-matlab"
description = "MATLAB grammar for the tree-sitter parsing library"
version = "0.0.1"
version = "1.0.2"
keywords = ["incremental", "parsing", "MATLAB"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/tree-sitter/tree-sitter-matlab"
Expand Down
22 changes: 1 addition & 21 deletions bindings/rust/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,14 @@ fn main() {
.flag_if_supported("-Wno-unused-parameter")
.flag_if_supported("-Wno-unused-but-set-variable")
.flag_if_supported("-Wno-trigraphs");

let parser_path = src_dir.join("parser.c");
c_config.file(&parser_path);

// If your language uses an external scanner written in C,
// then include this block of code:

/*
let scanner_path = src_dir.join("scanner.c");
c_config.file(&scanner_path);
println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());
*/

c_config.compile("parser");
println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap());

// If your language uses an external scanner written in C++,
// then include this block of code:

/*
let mut cpp_config = cc::Build::new();
cpp_config.cpp(true);
cpp_config.include(&src_dir);
cpp_config
.flag_if_supported("-Wno-unused-parameter")
.flag_if_supported("-Wno-unused-but-set-variable");
let scanner_path = src_dir.join("scanner.cc");
cpp_config.file(&scanner_path);
cpp_config.compile("scanner");
println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());
*/
}

0 comments on commit ea30dae

Please sign in to comment.