// // MPTokenStream.h // MathPad // // Created by Kim Wittenburg on 20.09.14. // Copyright (c) 2014 Kim Wittenburg. All rights reserved. // #import #import "MPToken.h" @interface MPTokenStream : NSObject - (instancetype)initWithTokens:(NSArray *)tokens; @property (nonatomic, copy) NSArray *tokens; @property (nonatomic, getter=isIgnoringWhitespaceTokens) BOOL ignoringWhitespaceTokens; // Default: YES @property (readonly, nonatomic) NSUInteger currentLocation; - (void)reset; - (BOOL)hasMoreTokens; - (MPToken *)nextToken; - (MPToken *)nextTokenOfType:(MPTokenType)type; @end