MCPcopy Index your code
hub / github.com/CodeGraphContext/CodeGraphContext / namedChildren

Method namedChildren

website/public/wasm/web-tree-sitter.js:941–958  ·  view source on GitHub ↗

* Iterate over this node's named children. * * See also Node#children.

()

Source from the content-addressed store, hash-verified

939 * See also {@link Node#children}.
940 */
941 get namedChildren() {
942 if (!this._namedChildren) {
943 marshalNode(this);
944 C._ts_node_named_children_wasm(this.tree[0]);
945 const count = C.getValue(TRANSFER_BUFFER, "i32");
946 const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, "i32");
947 this._namedChildren = new Array(count);
948 if (count > 0) {
949 let address = buffer;
950 for (let i2 = 0; i2 < count; i2++) {
951 this._namedChildren[i2] = unmarshalNode(this.tree, address);
952 address += SIZE_OF_NODE;
953 }
954 C._free(buffer);
955 }
956 }
957 return this._namedChildren;
958 }
959 /**
960 * Get the descendants of this node that are the given type, or in the given types array.
961 *

Callers

nothing calls this directly

Calls 3

marshalNodeFunction · 0.85
unmarshalNodeFunction · 0.85
getValueMethod · 0.45

Tested by

no test coverage detected