From e1b76fdaaee2f2923836e4f01e65e0a0a83ee4df Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Mon, 29 Jan 2018 16:41:42 +0100 Subject: [PATCH] compiler: Do not load TreeSitter grammars --- 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)