How to add more source files for the external scanner #3398
-
I'm trying to add more than just
// #include "../../src/parser.c"
// #include "../../src/scanner.c"
// #include "../../src/TokenTree.c"
let parser_path = src_dir.join("parser.c");
c_config.file(&parser_path);
println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap());
let scanner_path = src_dir.join("scanner.c");
c_config.file(&scanner_path);
println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());
let token_tree_path = src_dir.join("TokenTree.c");
c_config.file(&token_tree_path);
println!("cargo:rerun-if-changed={}", token_tree_path.to_str().unwrap());
"src/parser.c",
"src/scanner.c",
"src/TokenTree.c",
sources: [
"src/parser.c",
"src/scanner.c",
"src/TokenTree.c",
],
sources=[
"bindings/python/tree_sitter_vhdl/binding.c",
"src/parser.c",
"src/scanner.c",
"src/TokenTree.c",
], With all these updates, My build environment is:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
yeah the only way you can get this to work is to include the C files - adding complexity is not something we want to do by allowing multiple C source/header files. In practice, it's just not needed at all and if it is for templating/boilerplate/large static objects you can just directly include it. |
Beta Was this translation helpful? Give feedback.
yeah the only way you can get this to work is to include the C files - adding complexity is not something we want to do by allowing multiple C source/header files. In practice, it's just not needed at all and if it is for templating/boilerplate/large static objects you can just directly include it.