mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 339316: Empty IASTTranslationUnit.getRawSignature().
This commit is contained in:
parent
953c613eb9
commit
92a74d69df
2 changed files with 5 additions and 7 deletions
|
@ -92,7 +92,6 @@ public class CPreprocessor implements ILexerLog, IScanner, IAdaptable {
|
|||
private static final int PROTECT_DEFINED = 0x02;
|
||||
private static final int STOP_AT_NL = 0x04;
|
||||
private static final int CHECK_NUMBERS = 0x08;
|
||||
private static final Token END_OF_INPUT = new Token(IToken.tEND_OF_INPUT, null, 0, 0);
|
||||
|
||||
private interface IIncludeFileTester<T> {
|
||||
T checkFile(String path, boolean isHeuristicMatch, IncludeSearchPathElement onPath);
|
||||
|
@ -135,7 +134,7 @@ public class CPreprocessor implements ILexerLog, IScanner, IAdaptable {
|
|||
t= lexer.currentToken();
|
||||
}
|
||||
if (fStopAtNewline && t.getType() == Lexer.tNEWLINE)
|
||||
return END_OF_INPUT;
|
||||
return new Token(IToken.tEND_OF_INPUT, null, 0, 0);
|
||||
|
||||
return t;
|
||||
}
|
||||
|
@ -145,7 +144,7 @@ public class CPreprocessor implements ILexerLog, IScanner, IAdaptable {
|
|||
public Token currentToken() {
|
||||
Token t= fCurrentContext.currentLexerToken();
|
||||
if (fStopAtNewline && t.getType() == Lexer.tNEWLINE)
|
||||
return END_OF_INPUT;
|
||||
return new Token(IToken.tEND_OF_INPUT, null, 0, 0);
|
||||
|
||||
return t;
|
||||
}
|
||||
|
@ -573,6 +572,7 @@ public class CPreprocessor implements ILexerLog, IScanner, IAdaptable {
|
|||
|
||||
case IToken.tEND_OF_INPUT:
|
||||
if (fContentAssistLimit < 0) {
|
||||
fPrefetchedTokens= t1;
|
||||
throw new EndOfFileException(t1.getOffset());
|
||||
}
|
||||
int useType= fHandledCompletion ? IToken.tEOC : IToken.tCOMPLETION;
|
||||
|
|
|
@ -20,8 +20,6 @@ import org.eclipse.cdt.core.parser.OffsetLimitReachedException;
|
|||
* @since 5.0
|
||||
*/
|
||||
final class ScannerContext {
|
||||
private static final Token END_TOKEN = new Token(IToken.tEND_OF_INPUT, null, 0, 0);
|
||||
|
||||
enum BranchKind {eIf, eElif, eElse, eEnd}
|
||||
enum CodeState {eActive, eParseInactive, eSkipInactive}
|
||||
final static class Conditional {
|
||||
|
@ -231,7 +229,7 @@ final class ScannerContext {
|
|||
if (fLexer != null) {
|
||||
return fLexer.currentToken();
|
||||
}
|
||||
return END_TOKEN;
|
||||
return new Token(IToken.tEND_OF_INPUT, null, 0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -245,7 +243,7 @@ final class ScannerContext {
|
|||
if (fLexer != null) {
|
||||
return fLexer.nextToken();
|
||||
}
|
||||
return END_TOKEN;
|
||||
return new Token(IToken.tEND_OF_INPUT, null, 0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue