Skip to content

Commit dcdfbf4

Browse files
committed
fix:修复shorthand probe 越过 textEnd
1 parent ce972d6 commit dcdfbf4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/structural.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,10 +597,10 @@ const parseNodesWithFactory = <TNode extends StructuralNode | IndexedStructuralN
597597
info.argStart <= frame.shorthandProbeBoundaryI;
598598

599599
if (!canReuseProbe) {
600-
let boundary = frame.text.length;
600+
let boundary = frame.textEnd;
601601
let reject = false;
602602
let probe = info.argStart;
603-
while (probe < frame.text.length) {
603+
while (probe < frame.textEnd) {
604604
const [escaped, nextEsc] = readEscapedSequence(frame.text, probe, syntax);
605605
if (escaped !== null) {
606606
probe = nextEsc;

0 commit comments

Comments
 (0)