MCPcopy
hub / github.com/antvis/Infographic / parseLine

Function parseLine

src/syntax/relations.ts:288–295  ·  view source on GitHub ↗
(line: string)

Source from the content-addressed store, hash-verified

286 const itemMap = new Map<string, ItemDatum>();
287
288 const parseLine = (line: string) => {
289 if (!RELATION_TOKEN.test(line)) return;
290 const parsed = parseRelationLine(line);
291 parsed.nodes.forEach((nodeItem) => {
292 ensureItemLabel(itemMap, items, nodeItem.id, nodeItem.label);
293 });
294 relations.push(...parsed.relations);
295 };
296
297 if (node.kind === 'array') {
298 node.items.forEach((item, index) => {

Callers 1

parseRelationsNodeFunction · 0.85

Calls 3

parseRelationLineFunction · 0.85
ensureItemLabelFunction · 0.85
forEachMethod · 0.80

Tested by

no test coverage detected