mirror of
https://github.com/pnx/tree-sitter-dotenv
synced 2026-06-16 01:54:56 +02:00
Initial Commit
This commit is contained in:
commit
948e93ffac
40 changed files with 2760 additions and 0 deletions
13
bindings/go/binding.go
generated
Normal file
13
bindings/go/binding.go
generated
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
package tree_sitter_dotenv
|
||||
|
||||
// #cgo CFLAGS: -std=c11 -fPIC
|
||||
// #include "../../src/parser.c"
|
||||
// // NOTE: if your language has an external scanner, add it here.
|
||||
import "C"
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// Get the tree-sitter Language for this grammar.
|
||||
func Language() unsafe.Pointer {
|
||||
return unsafe.Pointer(C.tree_sitter_dotenv())
|
||||
}
|
||||
15
bindings/go/binding_test.go
generated
Normal file
15
bindings/go/binding_test.go
generated
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package tree_sitter_dotenv_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
tree_sitter_dotenv "github.com/pnx/tree-sitter-dotenv/bindings/go"
|
||||
tree_sitter "github.com/tree-sitter/go-tree-sitter"
|
||||
)
|
||||
|
||||
func TestCanLoadGrammar(t *testing.T) {
|
||||
language := tree_sitter.NewLanguage(tree_sitter_dotenv.Language())
|
||||
if language == nil {
|
||||
t.Errorf("Error loading Dotenv grammar")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue