Archived
1

Improved Evaluation

This commit is contained in:
Kim Wittenburg
2014-09-28 23:50:18 +02:00
parent 43b6f78afb
commit d67a1949e9
19 changed files with 841 additions and 89 deletions

View File

@@ -0,0 +1,34 @@
//
// MPFunction+MPToken.m
// MathPad
//
// Created by Kim Wittenburg on 19.09.14.
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
//
#import "MPFunction+MPToken.h"
@implementation MPFunction (MPToken)
- (MPTokenType)tokenType
{
return MPGenericFunctionToken;
}
- (NSRange)range
{
NSUInteger selfIndex = [self.parent indexOfElement:self];
return NSMakeRange([self.parent locationOfElementAtIndex:selfIndex], 1);
}
- (BOOL)exists
{
return YES;
}
- (NSString *)stringValue
{
return [self description];
}
@end