aboutsummaryrefslogtreecommitdiff
path: root/bindings/go/binding.go
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-04-18 11:07:53 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-04-18 11:35:24 +0200
commit4b160d1b2119cd2007ea7a76d4baba56ad66b825 (patch)
treea6c5d491c8306304cc9ec112ffedcae4ff6bced3 /bindings/go/binding.go
parent1f10ff9a6039a50e2f7be394fc22b1400832cf17 (diff)
Support comments… sortav1.2.0
Diffstat (limited to 'bindings/go/binding.go')
-rw-r--r--bindings/go/binding.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/bindings/go/binding.go b/bindings/go/binding.go
new file mode 100644
index 0000000..353f400
--- /dev/null
+++ b/bindings/go/binding.go
@@ -0,0 +1,13 @@
+package tree_sitter_gsp
+
+// #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_gsp())
+}