Cleaned Imports
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
|
||||
#import "MPTokenStream.h"
|
||||
|
||||
#import "MPToken.h"
|
||||
|
||||
@implementation MPTokenStream {
|
||||
NSUInteger _currentTokenIndex;
|
||||
NSUInteger eofLocation;
|
||||
@@ -86,7 +88,7 @@
|
||||
return _currentTokenIndex < self.tokens.count;
|
||||
}
|
||||
|
||||
- (MPToken *)currentToken
|
||||
- (id<MPToken>)currentToken
|
||||
{
|
||||
[self skipWhitespaces];
|
||||
if (_currentTokenIndex >= _tokens.count) {
|
||||
@@ -95,11 +97,11 @@
|
||||
return _tokens[_currentTokenIndex];
|
||||
}
|
||||
|
||||
- (MPToken *)peekNextToken
|
||||
- (id<MPToken>)peekNextToken
|
||||
{
|
||||
NSUInteger currentTokenIndex = _currentTokenIndex;
|
||||
[self currentTokenConsumed]; // Pretend the current token has been consumed
|
||||
MPToken *token = [self currentToken];
|
||||
id<MPToken> token = [self currentToken];
|
||||
_currentTokenIndex = currentTokenIndex; // Undo the lookahead
|
||||
return token;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user