work save
This commit is contained in:
parent
a5c4ceec7a
commit
78ad4e3324
|
@ -378,41 +378,38 @@ void cpptokenizer::skipPair(const QChar &cStart, const QChar cEnd, const QSet<QC
|
||||||
{
|
{
|
||||||
mCurrent++;
|
mCurrent++;
|
||||||
while (*mCurrent != '\0') do {
|
while (*mCurrent != '\0') do {
|
||||||
if (pCurrent^ = '(') and not ('(' in FailChars) then begin
|
if ((*mCurrent == '(') && !failChars.contains('(')) {
|
||||||
SkipPair('(', ')', FailChars);
|
skipPair('(', ')', failChars);
|
||||||
end else if (pCurrent^ = '[') and not ('[' in FailChars) then begin
|
} else if ((*mCurrent == '[') && !failChars.contains('[')) {
|
||||||
SkipPair('[', ']', FailChars);
|
skipPair('[', ']', failChars);
|
||||||
end else if (pCurrent^ = '{') and not ('}' in FailChars) then begin
|
} else if ((*mCurrent == '{') && !failChars.contains('{')) {
|
||||||
SkipPair('{', '}', FailChars);
|
skipPair('{', '}', failChars);
|
||||||
end else if (pCurrent^ = cStart) then begin
|
} else if (*mCurrent == cStart) {
|
||||||
SkipPair(cStart, cEnd, FailChars);
|
skipPair(cStart, cEnd, failChars);
|
||||||
end else if pCurrent^ = cEnd then begin
|
} else if (*mCurrent == cEnd) {
|
||||||
Inc(pCurrent); // skip over end
|
mCurrent++; // skip over end
|
||||||
break;
|
break;
|
||||||
end else if (pCurrent^ = 'R') and ((pCurrent+1)^ = '"') then begin
|
} else if ((*mCurrent == 'R') && (*(mCurrent+1) == '"')) {
|
||||||
if cStart <> '''' then
|
if (cStart != '\'' && cStart!='\"')
|
||||||
SkipRawString // don't do it inside AnsiString!
|
skipRawString(); // don't do it inside AnsiString!
|
||||||
else
|
else
|
||||||
Inc(pCurrent);
|
mCurrent++;
|
||||||
end else if pCurrent^ = '"' then begin
|
} else if (*mCurrent == '"') {
|
||||||
if cStart <> '''' then
|
if (cStart != '\'' && cStart!='\"')
|
||||||
SkipDoubleQuotes // don't do it inside AnsiString!
|
skipDoubleQuotes(); // don't do it inside AnsiString!
|
||||||
else
|
else
|
||||||
Inc(pCurrent);
|
mCurrent++;
|
||||||
end else if pCurrent^ = '''' then begin
|
} else if (*mCurrent == '\'') {
|
||||||
SkipSingleQuote;
|
if (cStart != '\'' && cStart!='\"')
|
||||||
end else if pCurrent^ = '/' then begin
|
skipSingleQuote(); // don't do it inside AnsiString!
|
||||||
if (pCurrent + 1)^ = '/' then
|
|
||||||
SkipToEOL
|
|
||||||
else if (pCurrent + 1)^ = '*' then
|
|
||||||
SkipCStyleComment // skips over */
|
|
||||||
else
|
else
|
||||||
Inc(pCurrent);
|
mCurrent++;
|
||||||
end else if pCurrent^ in FailChars then begin
|
} else if (failChars.contains(*mCurrent)) {
|
||||||
Exit;
|
break;
|
||||||
end else
|
} else {
|
||||||
Inc(pCurrent);
|
mCurrent++;
|
||||||
end;
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cpptokenizer::advance()
|
void cpptokenizer::advance()
|
||||||
|
|
Loading…
Reference in New Issue