1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Fixed isOnTopContext to check that there are inclusions on the data stack.

This commit is contained in:
Doug Schaefer 2005-03-30 16:33:37 +00:00
parent 61da45c653
commit 43222f2381

View file

@ -1467,7 +1467,10 @@ abstract class BaseScanner implements IScanner {
* @see org.eclipse.cdt.core.parser.IScanner#isOnTopContext() * @see org.eclipse.cdt.core.parser.IScanner#isOnTopContext()
*/ */
public boolean isOnTopContext() { public boolean isOnTopContext() {
return bufferStackPos <= 0; for (int i = 1; i <= bufferStackPos; ++i)
if (bufferData[i] instanceof InclusionData)
return false;
return true;
} }
protected IToken lastToken; protected IToken lastToken;