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

Function marshalNode

website/public/wasm/web-tree-sitter.js:1182–1193  ·  view source on GitHub ↗
(node, index = 0)

Source from the content-addressed store, hash-verified

1180}
1181__name(unmarshalCaptures, "unmarshalCaptures");
1182function marshalNode(node, index = 0) {
1183 let address = TRANSFER_BUFFER + index * SIZE_OF_NODE;
1184 C.setValue(address, node.id, "i32");
1185 address += SIZE_OF_INT;
1186 C.setValue(address, node.startIndex, "i32");
1187 address += SIZE_OF_INT;
1188 C.setValue(address, node.startPosition.row, "i32");
1189 address += SIZE_OF_INT;
1190 C.setValue(address, node.startPosition.column, "i32");
1191 address += SIZE_OF_INT;
1192 C.setValue(address, node[0], "i32");
1193}
1194__name(marshalNode, "marshalNode");
1195function unmarshalNode(tree, address = TRANSFER_BUFFER) {
1196 const id = C.getValue(address, "i32");

Callers 15

typeIdMethod · 0.85
endPositionMethod · 0.85
endIndexMethod · 0.85
isNamedMethod · 0.85
hasErrorMethod · 0.85
hasChangesMethod · 0.85
isMissingMethod · 0.85
childMethod · 0.85
namedChildMethod · 0.85
childForFieldIdMethod · 0.85
childCountMethod · 0.85
namedChildCountMethod · 0.85

Calls 1

setValueMethod · 0.80

Tested by

no test coverage detected