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