MCPcopy Index your code
hub / github.com/pomber/code-surfer / splitIntoColumns

Function splitIntoColumns

packs/step-parser/src/step-parser.ts:130–144  ·  view source on GitHub ↗
(
  types: string[],
  tokens: string[]
)

Source from the content-addressed store, hash-verified

128}
129
130function splitIntoColumns(
131 types: string[],
132 tokens: string[]
133): [string[], string[]] {
134 const newTypes: string[] = [];
135 const newTokens: string[] = [];
136 tokens.forEach((token, i) => {
137 const tokenType = types[i];
138 Array.from(token).forEach(char => {
139 newTokens.push(char);
140 newTypes.push(tokenType);
141 });
142 });
143 return [newTypes, newTokens];
144}
145
146function getDefaultFocus(prevLineKeys: number[], lineKeys: number[]) {
147 const focus = {} as Record<number, true>;

Callers 1

parseStepsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected