MCPcopy Create free account
hub / github.com/BUPT-GAMMA/MASFactory / getNodeText

Function getNodeText

masfactory-visualizer/src/parser/astUtils.ts:13–16  ·  view source on GitHub ↗
(node: TSNode | null, code: string)

Source from the content-addressed store, hash-verified

11 * Get text content of an AST node
12 */
13export function getNodeText(node: TSNode | null, code: string): string {
14 if (!node) {return '';}
15 return code.substring(node.startIndex, node.endIndex);
16}
17
18/**
19 * Query all nodes of a specific type in the AST

Callers 15

getKeywordArgMapFunction · 0.90
getExpandedDictNodeFunction · 0.90
parseCreateNodeFunction · 0.90
parseBuildFuncArgumentFunction · 0.90
getExpandedDictNodeFunction · 0.90
getExpandedKeywordValueFunction · 0.90
parseCreateEdgeFunction · 0.90
parseEdgeFromEntryFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected