mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
org.eclipse.cdt.core
Fixed Bug 50821 - Freezes when opening / saving .c file org.eclipse.cdt.core.tests Added ScannerTestCase::testBug50821().
This commit is contained in:
parent
a99b08ff8d
commit
878174520e
4 changed files with 15 additions and 1 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
2004-01-28 John Camelon
|
||||||
|
Added ScannerTestCase::testBug50821().
|
||||||
|
|
||||||
2004-01-27 John Camelon
|
2004-01-27 John Camelon
|
||||||
Renamed ContextualParseTest to CompletionParseTest.
|
Renamed ContextualParseTest to CompletionParseTest.
|
||||||
Updated COMPLETION_PARSE clients to use SINGLE_NAME_REFERENCE rather than STATEMENT_START.
|
Updated COMPLETION_PARSE clients to use SINGLE_NAME_REFERENCE rather than STATEMENT_START.
|
||||||
|
|
|
@ -1547,4 +1547,12 @@ public class ScannerTestCase extends BaseScannerTest
|
||||||
initializeScanner( buffer.toString(), ParserMode.COMPLETE_PARSE );
|
initializeScanner( buffer.toString(), ParserMode.COMPLETE_PARSE );
|
||||||
validateEOF();
|
validateEOF();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testBug50821() throws Exception
|
||||||
|
{
|
||||||
|
Callback callback = new Callback( ParserMode.QUICK_PARSE );
|
||||||
|
initializeScanner( "\'\n\n\n", ParserMode.QUICK_PARSE, callback );
|
||||||
|
scanner.nextToken();
|
||||||
|
assertEquals( callback.problems.size(), 1 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
2004-01-28 John Camelon
|
||||||
|
Fixed Bug 50821 - Freezes when opening / saving .c file
|
||||||
|
|
||||||
2004-01-28 John Camelon
|
2004-01-28 John Camelon
|
||||||
Fixed Bug 50711 - Wrong completion kind in a new expression
|
Fixed Bug 50711 - Wrong completion kind in a new expression
|
||||||
|
|
||||||
|
|
|
@ -1841,7 +1841,7 @@ public class Scanner implements IScanner {
|
||||||
( c == NOCHAR ) )
|
( c == NOCHAR ) )
|
||||||
{
|
{
|
||||||
handleProblem( IProblem.SCANNER_BAD_CHARACTER, new Character( (char)c ).toString(),beginOffset, false, true, throwExceptionOnBadCharacterRead );
|
handleProblem( IProblem.SCANNER_BAD_CHARACTER, new Character( (char)c ).toString(),beginOffset, false, true, throwExceptionOnBadCharacterRead );
|
||||||
c = ' ';
|
c = '\'';
|
||||||
}
|
}
|
||||||
// exit condition
|
// exit condition
|
||||||
if ( ( c =='\'' ) && ( prev != '\\' || prevPrev == '\\' ) ) break;
|
if ( ( c =='\'' ) && ( prev != '\\' || prevPrev == '\\' ) ) break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue