This adds a wrapper for the ts_node_child_by_field_name function directly (c.f. #99) . I realized, as I was working on this, that it is already possible to use the generated property getters, which go via field IDs, but in any case, this might be useful as it brings the API closer to parity with web-tree-sitter (#68)
My C++ is extremely rusty (no pun intended) so I'm happy to take any pointers on style etc. there, but I mostly followed the examples in the other functions.
I added a minimal test case, but I could add additional test cases if we agree this is useful.
This adds a wrapper for the
ts_node_child_by_field_name
function directly (c.f. #99) . I realized, as I was working on this, that it is already possible to use the generated property getters, which go via field IDs, but in any case, this might be useful as it brings the API closer to parity withweb-tree-sitter
(#68)My C++ is extremely rusty (no pun intended) so I'm happy to take any pointers on style etc. there, but I mostly followed the examples in the other functions.
I added a minimal test case, but I could add additional test cases if we agree this is useful.
Thanks!