diff options
Diffstat (limited to 'vendor/github.com/mitjafelicijan/go-tree-sitter/c/binding.go')
| -rw-r--r-- | vendor/github.com/mitjafelicijan/go-tree-sitter/c/binding.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vendor/github.com/mitjafelicijan/go-tree-sitter/c/binding.go b/vendor/github.com/mitjafelicijan/go-tree-sitter/c/binding.go new file mode 100644 index 0000000..369962e --- /dev/null +++ b/vendor/github.com/mitjafelicijan/go-tree-sitter/c/binding.go | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | package c | ||
| 2 | |||
| 3 | //#include "parser.h" | ||
| 4 | //TSLanguage *tree_sitter_c(); | ||
| 5 | import "C" | ||
| 6 | import ( | ||
| 7 | "unsafe" | ||
| 8 | |||
| 9 | sitter "github.com/mitjafelicijan/go-tree-sitter" | ||
| 10 | ) | ||
| 11 | |||
| 12 | func GetLanguage() *sitter.Language { | ||
| 13 | ptr := unsafe.Pointer(C.tree_sitter_c()) | ||
| 14 | return sitter.NewLanguage(ptr) | ||
| 15 | } | ||
