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:
parent
f5f345cdff
commit
fc9a1bc154
1 changed files with 7 additions and 3 deletions
|
@ -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' )
|
||||||
|
|
Loading…
Add table
Reference in a new issue