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

Function unmarshalNode

website/public/wasm/web-tree-sitter.js:1195–1214  ·  view source on GitHub ↗
(tree, address = TRANSFER_BUFFER)

Source from the content-addressed store, hash-verified

1193}
1194__name(marshalNode, "marshalNode");
1195function unmarshalNode(tree, address = TRANSFER_BUFFER) {
1196 const id = C.getValue(address, "i32");
1197 address += SIZE_OF_INT;
1198 if (id === 0) return null;
1199 const index = C.getValue(address, "i32");
1200 address += SIZE_OF_INT;
1201 const row = C.getValue(address, "i32");
1202 address += SIZE_OF_INT;
1203 const column = C.getValue(address, "i32");
1204 address += SIZE_OF_INT;
1205 const other = C.getValue(address, "i32");
1206 const result = new Node(INTERNAL, {
1207 id,
1208 tree,
1209 startIndex: index,
1210 startPosition: { row, column },
1211 other
1212 });
1213 return result;
1214}
1215__name(unmarshalNode, "unmarshalNode");
1216function marshalTreeCursor(cursor, address = TRANSFER_BUFFER) {
1217 C.setValue(address + 0 * SIZE_OF_INT, cursor[0], "i32");

Callers 15

rootNodeMethod · 0.85
childMethod · 0.85
namedChildMethod · 0.85
childForFieldIdMethod · 0.85
childrenMethod · 0.85
namedChildrenMethod · 0.85
descendantsOfTypeMethod · 0.85
nextSiblingMethod · 0.85
previousSiblingMethod · 0.85
nextNamedSiblingMethod · 0.85
previousNamedSiblingMethod · 0.85
parentMethod · 0.85

Calls 1

getValueMethod · 0.45

Tested by

no test coverage detected