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

Function parseKeysArgument

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

Source from the content-addressed store, hash-verified

100 * - `{...}` => object mapping
101 */
102export function parseKeysArgument(
103 node: TSNode,
104 code: string
105): { [key: string]: string } | null | 'empty' {
106 if (node.type === 'none') {
107 return null;
108 }
109 if (node.type === 'dictionary') {
110 const parsed = parseDictArgument(node, code);
111 return parsed ?? 'empty';
112 }
113 return null;
114}
115
116/**
117 * Graph base type constants

Callers 4

parseCreateNodeFunction · 0.90

Calls 1

parseDictArgumentFunction · 0.85

Tested by

no test coverage detected