MCPcopy Index your code
hub / github.com/callstack/agent-device / tokenizeReplayLine

Function tokenizeReplayLine

src/replay/script.ts:393–407  ·  view source on GitHub ↗
(line: string)

Source from the content-addressed store, hash-verified

391}
392
393function tokenizeReplayLine(line: string): string[] {
394 const tokens: string[] = [];
395 let cursor = 0;
396 while (cursor < line.length) {
397 cursor = skipReplayWhitespace(line, cursor);
398 if (cursor >= line.length) break;
399 const parsed =
400 line[cursor] === '"'
401 ? readQuotedReplayToken(line, cursor)
402 : readBareReplayToken(line, cursor);
403 tokens.push(parsed.value);
404 cursor = parsed.nextCursor;
405 }
406 return tokens;
407}
408
409function skipReplayWhitespace(line: string, cursor: number): number {
410 let nextCursor = cursor;

Callers 1

parseReplayScriptLineFunction · 0.70

Calls 4

skipReplayWhitespaceFunction · 0.85
readQuotedReplayTokenFunction · 0.85
readBareReplayTokenFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected