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