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