smacker / go-tree-sitter

Golang bindings for tree-sitter https://github.com/tree-sitter/tree-sitter
MIT License
447 stars 124 forks source link

Updated 19 grammars to their latest versions #158

Closed micksmix closed 7 months ago

micksmix commented 7 months ago

Using _automation/main.go I updated the following grammars to their latest versions, and verified that all tests passed.

Languages updated are:

For these languages, I had to make minor changes to the respective binding_test.go because there was some change to the syntax tree generated by tree-sitter + the grammar:

I also made minor changes to _automation/main.go to support referencing tree-sitter header files which are located ../ one directory up

@smacker - please review when you have time. Also, I want to thank you for all the work you do to maintain this repo! I really appreciate it!

micksmix commented 7 months ago

I also made a minor change to _automation/main.go so that language specific files would find the necessary tree-sitter headers (array.h and alloc.h), which is 1 directory up from the grammar (root of this repo).

map[string]string{
  `<tree_sitter/parser.h>`: `"parser.h"`,
  `"tree_sitter/parser.h"`: `"parser.h"`,
  `"tree_sitter/array.h"`:  `"../array.h"`,
  `<tree_sitter/array.h>`:  `"../array.h"`,
  `"tree_sitter/alloc.h"`:  `"../alloc.h"`,
  `<tree_sitter/alloc.h>`:  `"../alloc.h"`,
},
smacker commented 7 months ago

Thank you @micksmix !

I haven't been maintaining this repository much recently. Thank you for keeping it alive!