web: Add bindings for remaining field APIs

This commit is contained in:
Max Brunsfeld 2019-06-18 20:36:24 -07:00
parent 30e73505e1
commit 82fab90c0b
5 changed files with 81 additions and 5 deletions

View file

@ -331,6 +331,11 @@ void ts_node_named_child_wasm(const TSTree *tree, uint32_t index) {
marshal_node(TRANSFER_BUFFER, ts_node_named_child(node, index));
}
void ts_node_child_by_field_id_wasm(const TSTree *tree, uint32_t field_id) {
TSNode node = unmarshal_node(tree);
marshal_node(TRANSFER_BUFFER, ts_node_child_by_field_id(node, field_id));
}
void ts_node_next_sibling_wasm(const TSTree *tree) {
TSNode node = unmarshal_node(tree);
marshal_node(TRANSFER_BUFFER, ts_node_next_sibling(node));