mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Fixed isOnTopContext to check that there are inclusions on the data stack.
This commit is contained in:
parent
61da45c653
commit
43222f2381
1 changed files with 4 additions and 1 deletions
|
@ -1467,7 +1467,10 @@ abstract class BaseScanner implements IScanner {
|
|||
* @see org.eclipse.cdt.core.parser.IScanner#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;
|
||||
|
|
Loading…
Add table
Reference in a new issue