mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Patch for Devin Steffler.
Fixed Bug 96678 - Scanner is reporting bad character problem on // comments
This commit is contained in:
parent
c1bbb62c95
commit
044af29ec9
2 changed files with 5 additions and 0 deletions
|
@ -4468,6 +4468,10 @@ public class AST2CPPTests extends AST2BaseTest {
|
||||||
ICPPFunction copy = (ICPPFunction) col.getName(0).resolveBinding();
|
ICPPFunction copy = (ICPPFunction) col.getName(0).resolveBinding();
|
||||||
assertSame( copy, col.getName(7).resolveBinding() );
|
assertSame( copy, col.getName(7).resolveBinding() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testBug96678() throws Exception {
|
||||||
|
IASTTranslationUnit tu = parse( "int x; // comment \r\n", ParserLanguage.CPP, false, true ); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
|
||||||
public void testNewExpressionType() throws Exception {
|
public void testNewExpressionType() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuffer buffer = new StringBuffer();
|
||||||
|
|
|
@ -1654,6 +1654,7 @@ abstract class BaseScanner implements IScanner {
|
||||||
int pos = bufferPos[bufferStackPos];
|
int pos = bufferPos[bufferStackPos];
|
||||||
|
|
||||||
switch (buffer[pos]) {
|
switch (buffer[pos]) {
|
||||||
|
case '\r':
|
||||||
case '\n':
|
case '\n':
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue