From fc9a1bc15467a14b1d5c0f5cfd207aeab67ce9f5 Mon Sep 17 00:00:00 2001 From: John Camelon Date: Thu, 5 Jun 2003 20:16:30 +0000 Subject: [PATCH] Patch for Victor Morgzin. Fix Bug 38065 Handling include statements with backslashes in Outline --- .../org/eclipse/cdt/internal/core/parser/Scanner.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Scanner.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Scanner.java index c254416c472..bb527d5eadd 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Scanner.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Scanner.java @@ -198,7 +198,7 @@ public class Scanner implements IScanner { return buffer.toString(); } - protected void skipOverTextUntilNewline() { + protected void skipOverTextUntilNewline() throws ScannerException { for (;;) { switch (getChar()) { case NOCHAR : @@ -366,12 +366,12 @@ public class Scanner implements IScanner { callback = c; } - private int getChar() + private int getChar() throws ScannerException { return getChar( false ); } - private int getChar( boolean insideString ) { + private int getChar( boolean insideString ) throws ScannerException { int c = NOCHAR; lastContext = contextStack.getCurrentContext(); @@ -423,6 +423,10 @@ public class Scanner implements IScanner { c = getChar(false); if( c == '\n') contextStack.newLine(); + } else // '\' is not the last character on the line + { + ungetChar(c); + c = '\\'; } } else if( c == '\n' )