Archived
1
This repository has been archived on 2022-08-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
mathpad/MathKit/MPToken.m
2015-01-04 22:16:27 +01:00

44 lines
767 B
Objective-C

//
// 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