File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1656,15 +1656,15 @@ template or(rules...) if (rules.length > 0)
1656
1656
failedLength[i] = temp.end;
1657
1657
if (temp.end >= longestFail.end)
1658
1658
{
1659
+ if (temp.end == longestFail.end)
1660
+ errorStringChars += (temp.matches.length > 0 ? temp.matches[$-1].length : 0) + errName.length + 4;
1661
+ else
1662
+ errorStringChars = (temp.matches.length > 0 ? temp.matches[$-1].length : 0) + errName.length + 4;
1659
1663
maxFailedLength = temp.end;
1660
1664
longestFail = temp;
1661
1665
names[i] = errName;
1662
1666
results[i] = temp;
1663
1667
1664
- if (temp.end == longestFail.end)
1665
- errorStringChars += (temp.matches.length > 0 ? temp.matches[$-1].length : 0) + errName.length + 4;
1666
- else
1667
- errorStringChars = (temp.matches.length > 0 ? temp.matches[$-1].length : 0) + errName.length + 4;
1668
1668
}
1669
1669
// Else, this error parsed less input than another one: we discard it.
1670
1670
}
You can’t perform that action at this time.
0 commit comments