From f7835f71191af350730becc12d5f062698c8e7af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicent=20Mart=C3=AD?= Date: Mon, 29 Jan 2018 18:14:14 +0100 Subject: [PATCH] compiler: Do not load TreeSitter grammars (#4013) --- tools/grammars/compiler/loader.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/grammars/compiler/loader.go b/tools/grammars/compiler/loader.go index b1770092..5937bdd2 100644 --- a/tools/grammars/compiler/loader.go +++ b/tools/grammars/compiler/loader.go @@ -108,6 +108,11 @@ func isValidGrammar(path string, info os.FileInfo) bool { return false } + // Tree-Sitter grammars are not supported + if strings.HasPrefix(filepath.Base(path), "tree-sitter-") { + return false + } + dir := filepath.Dir(path) ext := filepath.Ext(path)