feat(package): hemar: tree sitter grammar

This commit is contained in:
2025-11-27 17:53:49 +00:00
parent 777d48bf3d
commit 345f94742e
38 changed files with 2891 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
package tree_sitter_hemar
// #cgo CFLAGS: -std=c11 -fPIC
// #include "../../src/parser.c"
// #if __has_include("../../src/scanner.c")
// #include "../../src/scanner.c"
// #endif
import "C"
import "unsafe"
// Get the tree-sitter Language for this grammar.
func Language() unsafe.Pointer {
return unsafe.Pointer(C.tree_sitter_hemar())
}

View File

@@ -0,0 +1,15 @@
package tree_sitter_hemar_test
import (
"testing"
tree_sitter "github.com/tree-sitter/go-tree-sitter"
tree_sitter_hemar "github.com/hectic-lab/util.nix/bindings/go"
)
func TestCanLoadGrammar(t *testing.T) {
language := tree_sitter.NewLanguage(tree_sitter_hemar.Language())
if language == nil {
t.Errorf("Error loading Hemar grammar")
}
}