Reorganized File Structure
Added Documentation
This commit is contained in:
44
MathKit/MPToken.m
Normal file
44
MathKit/MPToken.m
Normal file
@@ -0,0 +1,44 @@
|
||||
//
|
||||
// MPToken.m
|
||||
// MathPad
|
||||
//
|
||||
// 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
|
||||
Reference in New Issue
Block a user