be more strict in checkRep
parent
5306f0c98a
commit
22803da42f
|
@ -255,20 +255,20 @@ exports.checkRep = function (cs) {
|
||||||
var o = iter.next();
|
var o = iter.next();
|
||||||
switch (o.opcode) {
|
switch (o.opcode) {
|
||||||
case '=':
|
case '=':
|
||||||
|
exports.assert(o.chars >= o.lines, o.chars, " chars and ", o.lines, " lines in op ",cs);
|
||||||
oldPos += o.chars;
|
oldPos += o.chars;
|
||||||
calcNewLen += o.chars;
|
calcNewLen += o.chars;
|
||||||
break;
|
break;
|
||||||
case '-':
|
case '-':
|
||||||
|
exports.assert(o.chars >= o.lines, o.chars, " chars and ", o.lines, " lines in op ",cs);
|
||||||
oldPos += o.chars;
|
oldPos += o.chars;
|
||||||
exports.assert(oldPos < oldLen, oldPos, " >= ", oldLen, " in ", cs);
|
exports.assert(oldPos < oldLen, oldPos, " >= ", oldLen, " in ", cs);
|
||||||
break;
|
break;
|
||||||
case '+':
|
case '+':
|
||||||
{
|
exports.assert(o.chars >= o.lines, o.chars, " chars and ", o.lines, " lines in op ",cs);
|
||||||
calcNewLen += o.chars;
|
calcNewLen += o.chars;
|
||||||
numInserted += o.chars;
|
exports.assert(calcNewLen < newLen, calcNewLen, " >= ", newLen, " in ", cs);
|
||||||
exports.assert(calcNewLen < newLen, calcNewLen, " >= ", newLen, " in ", cs);
|
break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
assem.append(o);
|
assem.append(o);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue