MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / parse

Function parse

lib/stack-usage-transformer.ts:39–56  ·  view source on GitHub ↗
(suText: string)

Source from the content-addressed store, hash-verified

37};
38
39export function parse(suText: string): StackUsageInfo[] {
40 const output: StackUsageInfo[] = [];
41 for (const line of suText.split('\n').filter(Boolean)) {
42 const c = line.split('\t');
43 const pathLocName = c[0].split(':');
44 const lineNumber = +pathLocName[1];
45 const qualifier = c.at(-1);
46 const su = {
47 DebugLoc: {File: pathLocName[0], Line: lineNumber, Column: 0},
48 Function: pathLocName.at(-1),
49 Qualifier: qualifier,
50 BytesUsed: Number.parseInt(c[1], 10),
51 displayString: c[1] + ' bytes, ' + qualifier,
52 };
53 output.push(su as StackUsageInfo);
54 }
55 return output;
56}

Callers

nothing calls this directly

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected