Remove invalid characters from grammar names
This commit is contained in:
parent
ce040e21e1
commit
d102c473e8
1 changed files with 5 additions and 1 deletions
|
|
@ -53,7 +53,11 @@ for lang in ${languages[@]}; do
|
|||
|
||||
modes=(true halt false recover)
|
||||
for i in 0 2; do
|
||||
$CXX $CXXFLAGS -std=c++11 -I lib/include -D TS_HALT_ON_ERROR="${modes[i]}" -D TS_LANG="tree_sitter_$lang" \
|
||||
# FIXME: We should extract the grammar name from grammar.js. Use the name of
|
||||
# the directory instead. Also, the grammar name needs to be a valid C
|
||||
# identifier so replace any '-' characters
|
||||
ts_lang="tree_sitter_$(echo $lang | tr -- - _)"
|
||||
$CXX $CXXFLAGS -std=c++11 -I lib/include -D TS_HALT_ON_ERROR="${modes[i]}" -D TS_LANG="$ts_lang" \
|
||||
"test/fuzz/fuzzer.cc" "${objects[@]}" \
|
||||
libtree-sitter.a "$LIB_FUZZER_PATH" \
|
||||
-o "out/${lang}_fuzzer_${modes[i+1]}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue