Gim/internal/syntax/query_assets_test.go
Hayden Hargreaves 16d1318c22 feat: start TS impl
This is so vibe coded, but in the interest of time, its a bit
necessary. Plus this is a complex problem that I don't have the mental
bandwidth to invest right now.
2026-04-07 10:23:25 -07:00

26 lines
549 B
Go

package syntax
import (
"testing"
sitter "github.com/tree-sitter/go-tree-sitter"
ts_go "github.com/tree-sitter/tree-sitter-go/bindings/go"
)
func TestEmbeddedGoQueryCompiles(t *testing.T) {
b, err := loadGoHighlightsQuery()
if err != nil {
t.Fatalf("failed loading embedded query: %v", err)
}
if len(b) == 0 {
t.Fatalf("embedded query is empty")
}
lang := sitter.NewLanguage(ts_go.Language())
q, qErr := sitter.NewQuery(lang, string(b))
if qErr != nil {
t.Fatalf("embedded go query failed to compile: %v", qErr)
}
q.Close()
}