Include parser header content in library crate
This commit is contained in:
parent
6194dfc247
commit
d7bc61cada
2 changed files with 3 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ pub fn generate_parser_in_directory(
|
|||
npm_files::index_js(&language_name)
|
||||
})?;
|
||||
ensure_file(&repo_header_path.join("parser.h"), || {
|
||||
include_str!("../../../lib/include/tree_sitter/parser.h")
|
||||
tree_sitter::PARSER_HEADER
|
||||
})?;
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ use std::slice;
|
|||
use std::str;
|
||||
use std::u16;
|
||||
|
||||
pub const PARSER_HEADER: &'static str = include_str!("../include/tree_sitter/parser.h");
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
#[repr(transparent)]
|
||||
pub struct Language(*const ffi::TSLanguage);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue