-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #179 from DerekStride/ds/remove-unused-keyword
fix: removed unused keyword
- Loading branch information
Showing
5 changed files
with
70 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
mkdir -p tmp/tree-sitter-sql/ | ||
|
||
cat src/grammar.json | | ||
jq '.rules | to_entries[] | select(.key | contains("keyword")) | .key' | | ||
tr -d '"' | | ||
sort > tmp/tree-sitter-sql/keywords.txt | ||
|
||
cat queries/highlights.scm | | ||
grep -o "keyword\w\+" | | ||
sort > tmp/tree-sitter-sql/highlights.txt | ||
|
||
keywords=$(comm -3 tmp/tree-sitter-sql/keywords.txt tmp/tree-sitter-sql/highlights.txt) | ||
|
||
if [[ "$keywords" ]]; then | ||
echo "ERROR: keywords in grammar.json are not in sync with queries/highlights.scm" | ||
echo $keywords | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters