tree-sitter/script/fetch-fixtures
Max Brunsfeld e1a3a1daeb Import error corpus entries from grammar repos
Now that error recovery requires no input for the grammar author, it shouldn't
be tested in the individual grammar repos.
2016-05-28 20:12:02 -07:00

27 lines
467 B
Bash
Executable file

#!/usr/bin/env bash
GRAMMARS_DIR=$(dirname $0)/../spec/fixtures/grammars
GRAMMARS=(
javascript
json
c
cpp
)
for grammar in ${GRAMMARS[@]}; do
echo "Fetching ${grammar} grammar..."
grammar_dir=${GRAMMARS_DIR}/${grammar}
grammar_url=https://github.com/tree-sitter/tree-sitter-${grammar}
if [ ! -d $grammar_dir ]; then
git clone $grammar_url $grammar_dir
fi
(
cd $grammar_dir;
git reset --hard;
git pull origin master;
)
done