MCPcopy Index your code
hub / github.com/codeaashu/claude-code / restoreLexToByte

Function restoreLexToByte

src/utils/bash/bashParser.ts:1989–2001  ·  view source on GitHub ↗
(P: ParseState, targetByte: number)

Source from the content-addressed store, hash-verified

1987}
1988
1989function restoreLexToByte(P: ParseState, targetByte: number): void {
1990 if (!P.L.byteTable) byteAt(P.L, 0)
1991 const t = P.L.byteTable!
1992 let lo = 0
1993 let hi = P.src.length
1994 while (lo < hi) {
1995 const m = (lo + hi) >>> 1
1996 if (t[m]! < targetByte) lo = m + 1
1997 else hi = m
1998 }
1999 P.L.i = lo
2000 P.L.b = targetByte
2001}
2002
2003/**
2004 * Parse a word-position element: bare word, string, expansion, or concatenation

Callers 1

parseHeredocBodyContentFunction · 0.85

Calls 1

byteAtFunction · 0.85

Tested by

no test coverage detected