You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
return`const ${name} = /*#__PURE__*/ (() => { const a = new Uint8Array(256); for (const [lo, hi] of [${ranges.join(', ')}]) for (let i = lo; i <= hi; i++) a[i] = 1; return a; })();`;
}
// Boolean expr testing whether the buffered token t starts branch i (FIRST set membership).
if (ch === 10 || ch === 13) { // LF/CR only — the interpreter's newline mode rejects LS/PS (gen-lexer.ts blank-line check)
pos = p + 1; if (ch === 13 && pos < n && src.charCodeAt(pos) === 10) pos++;
continue;
}
if (ch === 9) {
let b = p;
while (b < n && (src.charCodeAt(b) === 32 || src.charCodeAt(b) === 9)) b++;
if (b >= n) { pos = b; continue; }
const bc = src.charCodeAt(b);
if (bc === 10 || bc === 13) {
pos = b + 1; if (bc === 13 && pos < n && src.charCodeAt(pos) === 10) pos++;
continue;
}
}
${commentSkip} pos = p;
if (emittedContent) ${pushFn}(pos, pos, ${kidOf(ids,nl.token)}, 0);
lineStart = false;
continue;
}
`,
ws: ` if (c === 32 || c === 9 || c === 11 || c === 12 || c === 160 || c === 5760 || (c >= 8192 && c <= 8202) || c === 8239 || c === 8287 || c === 12288 || c === 65279) { pos++; continue; }
if (c === 10 || c === 13) { // LF/CR only — LS/PS fall through to the unexpected-character throw, matching the interpreter
pos++; if (c === 13 && pos < n && src.charCodeAt(pos) === 10) pos++;
if (flowDepth === 0) lineStart = true;
continue;
}
`,
hooks: ` if (kid !== _kidNl) emittedContent = true;
if (kid === 0 && _flowOpen.has(_LIDS[lid]!)) flowDepth++;
constnlWs=nl ? newlineParts(nl,stateful ? 'emit' : 'push',ids).ws : ` if (c === 10 || c === 13 || c === 8232 || c === 8233) { pendingNl = true; pos++; continue; }
if (c === 32 || c === 9 || c === 11 || c === 12 || c === 160 || c === 5760 || (c >= 8192 && c <= 8202) || c === 8239 || c === 8287 || c === 12288 || c === 65279) { pos++; continue; }