parser fix
This commit is contained in:
parent
9ef47d566d
commit
79fb25db38
|
@ -54,12 +54,12 @@ QString ParseCSS::cleanUp(QString text)
|
|||
matchesPos.clear();
|
||||
if (stringDQPos != -1 && stringDQPos < offset) {
|
||||
stringDQMatch = stringDQExpression.match(text, offset);
|
||||
stringDQPos = stringDQMatch.capturedStart();
|
||||
stringDQPos = stringDQMatch.capturedStart(1)-1;
|
||||
}
|
||||
if (stringDQPos >= 0) matchesPos.append(stringDQPos);
|
||||
if (stringSQPos != -1 && stringSQPos < offset) {
|
||||
stringSQMatch = stringSQExpression.match(text, offset);
|
||||
stringSQPos = stringSQMatch.capturedStart();
|
||||
stringSQPos = stringSQMatch.capturedStart(1)-1;
|
||||
}
|
||||
if (stringSQPos >= 0) matchesPos.append(stringSQPos);
|
||||
if (commentMLPos != -1 && commentMLPos < offset) {
|
||||
|
|
|
@ -44,12 +44,12 @@ QString ParseJS::cleanUp(QString text)
|
|||
matchesPos.clear();
|
||||
if (stringDQPos != -1 && stringDQPos < offset) {
|
||||
stringDQMatch = stringDQExpression.match(text, offset);
|
||||
stringDQPos = stringDQMatch.capturedStart();
|
||||
stringDQPos = stringDQMatch.capturedStart(1)-1;
|
||||
}
|
||||
if (stringDQPos >= 0) matchesPos.append(stringDQPos);
|
||||
if (stringSQPos != -1 && stringSQPos < offset) {
|
||||
stringSQMatch = stringSQExpression.match(text, offset);
|
||||
stringSQPos = stringSQMatch.capturedStart();
|
||||
stringSQPos = stringSQMatch.capturedStart(1)-1;
|
||||
}
|
||||
if (stringSQPos >= 0) matchesPos.append(stringSQPos);
|
||||
if (commentMLPos != -1 && commentMLPos < offset) {
|
||||
|
@ -64,12 +64,12 @@ QString ParseJS::cleanUp(QString text)
|
|||
if (commentSLPos >= 0) matchesPos.append(commentSLPos);
|
||||
if (regexpPos != -1 && regexpPos < offset) {
|
||||
regexpMatch = regexpExpression.match(text, offset);
|
||||
regexpPos = regexpMatch.capturedStart(1); // group 1
|
||||
regexpPos = regexpMatch.capturedStart(1)-1;
|
||||
}
|
||||
if (regexpPos >= 0) matchesPos.append(regexpPos);
|
||||
if (backtickPos != -1 && backtickPos < offset) {
|
||||
backtickMatch = backtickExpression.match(text, offset);
|
||||
backtickPos = backtickMatch.capturedStart();
|
||||
backtickPos = backtickMatch.capturedStart(1)-1;
|
||||
}
|
||||
if (backtickPos >= 0) matchesPos.append(backtickPos);
|
||||
if (matchesPos.size() == 0) break;
|
||||
|
|
|
@ -103,12 +103,12 @@ QString ParsePHP::cleanUp(QString text)
|
|||
if (phpEndPos >= 0) matchesPos.append(phpEndPos);
|
||||
if (stringDQPos != -1 && stringDQPos < offset) {
|
||||
stringDQMatch = stringDQExpression.match(text, offset);
|
||||
stringDQPos = stringDQMatch.capturedStart();
|
||||
stringDQPos = stringDQMatch.capturedStart(1)-1;
|
||||
}
|
||||
if (stringDQPos >= 0) matchesPos.append(stringDQPos);
|
||||
if (stringSQPos != -1 && stringSQPos < offset) {
|
||||
stringSQMatch = stringSQExpression.match(text, offset);
|
||||
stringSQPos = stringSQMatch.capturedStart();
|
||||
stringSQPos = stringSQMatch.capturedStart(1)-1;
|
||||
}
|
||||
if (stringSQPos >= 0) matchesPos.append(stringSQPos);
|
||||
if (stringHeredocPos != -1 && stringHeredocPos < offset) {
|
||||
|
@ -143,7 +143,7 @@ QString ParsePHP::cleanUp(QString text)
|
|||
if (commentSLAPos >= 0) matchesPos.append(commentSLAPos);
|
||||
if (backtickPos != -1 && backtickPos < offset) {
|
||||
backtickMatch = backtickExpression.match(text, offset);
|
||||
backtickPos = backtickMatch.capturedStart();
|
||||
backtickPos = backtickMatch.capturedStart(1)-1;
|
||||
}
|
||||
if (backtickPos >= 0) matchesPos.append(backtickPos);
|
||||
if (matchesPos.size() == 0) break;
|
||||
|
|
Loading…
Reference in New Issue