tree-sitter / node-tree-sitter

Node.js bindings for tree-sitter
https://www.npmjs.com/package/tree-sitter
MIT License
649 stars 114 forks source link

Add a getter to Tree's language property #65

Closed thibaultdalban closed 1 year ago

thibaultdalban commented 4 years ago

Allow Tree's language property to be accessible using the getter getLanguage()

verhovsky commented 1 year ago

This won't work because Tree doesn't have a .language property, it would need to be added in tree.cc

https://github.com/tree-sitter/node-tree-sitter/blob/7f67305115e0501d64f04a7d1a47c1e5934eed96/src/tree.cc#L24-L36