1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Patch for Victor Morgzin.

Fix Bug 38065     Handling include statements with backslashes in Outline
This commit is contained in:
John Camelon 2003-06-05 20:16:30 +00:00
parent f5f345cdff
commit fc9a1bc154

View file

@ -198,7 +198,7 @@ public class Scanner implements IScanner {
return buffer.toString(); return buffer.toString();
} }
protected void skipOverTextUntilNewline() { protected void skipOverTextUntilNewline() throws ScannerException {
for (;;) { for (;;) {
switch (getChar()) { switch (getChar()) {
case NOCHAR : case NOCHAR :
@ -366,12 +366,12 @@ public class Scanner implements IScanner {
callback = c; callback = c;
} }
private int getChar() private int getChar() throws ScannerException
{ {
return getChar( false ); return getChar( false );
} }
private int getChar( boolean insideString ) { private int getChar( boolean insideString ) throws ScannerException {
int c = NOCHAR; int c = NOCHAR;
lastContext = contextStack.getCurrentContext(); lastContext = contextStack.getCurrentContext();
@ -423,6 +423,10 @@ public class Scanner implements IScanner {
c = getChar(false); c = getChar(false);
if( c == '\n') if( c == '\n')
contextStack.newLine(); contextStack.newLine();
} else // '\' is not the last character on the line
{
ungetChar(c);
c = '\\';
} }
} }
else if( c == '\n' ) else if( c == '\n' )