feat(web): document the API
This commit is contained in:
parent
a4b20c1c56
commit
09cb4c5729
17 changed files with 1155 additions and 198 deletions
|
|
@ -43,6 +43,7 @@
|
|||
"ts_node_next_named_sibling_wasm",
|
||||
"ts_node_next_sibling_wasm",
|
||||
"ts_node_parent_wasm",
|
||||
"ts_node_child_with_descendant_wasm",
|
||||
"ts_node_prev_named_sibling_wasm",
|
||||
"ts_node_prev_sibling_wasm",
|
||||
"ts_node_descendant_count_wasm",
|
||||
|
|
|
|||
|
|
@ -597,6 +597,12 @@ void ts_node_parent_wasm(const TSTree *tree) {
|
|||
marshal_node(TRANSFER_BUFFER, ts_node_parent(node));
|
||||
}
|
||||
|
||||
void ts_node_child_with_descendant_wasm(const TSTree *tree) {
|
||||
TSNode node = unmarshal_node(tree);
|
||||
TSNode descendant = unmarshal_node(tree);
|
||||
marshal_node(TRANSFER_BUFFER, ts_node_child_with_descendant(node, descendant));
|
||||
}
|
||||
|
||||
void ts_node_descendant_for_index_wasm(const TSTree *tree) {
|
||||
TSNode node = unmarshal_node(tree);
|
||||
const void **address = TRANSFER_BUFFER + SIZE_OF_NODE;
|
||||
|
|
|
|||
1
lib/binding_web/lib/tree-sitter.d.ts
generated
vendored
1
lib/binding_web/lib/tree-sitter.d.ts
generated
vendored
|
|
@ -174,6 +174,7 @@ interface WasmModule {
|
|||
_ts_node_prev_named_sibling_wasm(_0: number): void;
|
||||
_ts_node_descendant_count_wasm(_0: number): number;
|
||||
_ts_node_parent_wasm(_0: number): void;
|
||||
_ts_node_child_with_descendant_wasm(_0: number): void;
|
||||
_ts_node_descendant_for_index_wasm(_0: number): void;
|
||||
_ts_node_named_descendant_for_index_wasm(_0: number): void;
|
||||
_ts_node_descendant_for_position_wasm(_0: number): void;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue