Get logging flags working properly with test script
This commit is contained in:
parent
b1fa49448d
commit
5c3c1dd0bd
19 changed files with 140 additions and 225 deletions
17
script/generate-bindings
Executable file
17
script/generate-bindings
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
output_path=lib/binding/bindings.rs
|
||||
header_path='lib/include/tree_sitter/api.h'
|
||||
|
||||
bindgen \
|
||||
--no-layout-tests \
|
||||
--whitelist-type '^TS.*' \
|
||||
--whitelist-function '^ts_.*' \
|
||||
--opaque-type FILE \
|
||||
--distrust-clang-mangling \
|
||||
$header_path > $output_path
|
||||
|
||||
echo "" >> $output_path
|
||||
version_constant='TREE_SITTER_LANGUAGE_VERSION'
|
||||
version_number=$(egrep "#define $version_constant (.*)" $header_path | cut -d' ' -f3)
|
||||
echo "pub const $version_constant: usize = $version_number;" >> $output_path
|
||||
Loading…
Add table
Add a link
Reference in a new issue