//
//  MPToken.m
//  MathKit
//
//  Created by Kim Wittenburg on 19.09.14.
//  Copyright (c) 2014 Kim Wittenburg. All rights reserved.
//

#import "MPToken.h"



@interface MPToken ()

@property (readonly, nonatomic) NSRange range;
@property (readonly, nonatomic, strong) NSString *stringValue;
@property (readonly, nonatomic) MPTokenType tokenType;

@end



@implementation MPToken

- (instancetype)initWithTokenType:(MPTokenType)tokenType
                            range:(NSRange)range
                      stringValue:(NSString *)input
{
    self = [super init];
    if (self) {
        _range = range;
        _stringValue = input.copy;
        _tokenType = tokenType;
    }
    return self;
}


- (NSString *)description
{
    return self.stringValue;
}

@end