* Iterate over this node's children. * * If you're walking the tree recursively, you may want to use the * TreeCursor APIs directly instead.
()
| 916 | * {@link TreeCursor} APIs directly instead. |
| 917 | */ |
| 918 | get children() { |
| 919 | if (!this._children) { |
| 920 | marshalNode(this); |
| 921 | C._ts_node_children_wasm(this.tree[0]); |
| 922 | const count = C.getValue(TRANSFER_BUFFER, "i32"); |
| 923 | const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, "i32"); |
| 924 | this._children = new Array(count); |
| 925 | if (count > 0) { |
| 926 | let address = buffer; |
| 927 | for (let i2 = 0; i2 < count; i2++) { |
| 928 | this._children[i2] = unmarshalNode(this.tree, address); |
| 929 | address += SIZE_OF_NODE; |
| 930 | } |
| 931 | C._free(buffer); |
| 932 | } |
| 933 | } |
| 934 | return this._children; |
| 935 | } |
| 936 | /** |
| 937 | * Iterate over this node's named children. |
| 938 | * |
nothing calls this directly
no test coverage detected