Initial commit

This commit is contained in:
2024-12-15 15:35:32 +02:00
commit 9a923cded1
49 changed files with 8742 additions and 0 deletions

13
bindings/go/binding.go generated Normal file
View File

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

15
bindings/go/binding_test.go generated Normal file
View File

@@ -0,0 +1,15 @@
package tree_sitter_bruno_test
import (
"testing"
tree_sitter "github.com/tree-sitter/go-tree-sitter"
tree_sitter_bruno "github.com/kristoferssolo/tree-sitter-bruno/bindings/go"
)
func TestCanLoadGrammar(t *testing.T) {
language := tree_sitter.NewLanguage(tree_sitter_bruno.Language())
if language == nil {
t.Errorf("Error loading Bruno grammar")
}
}