35 lines
549 B
Objective-C
35 lines
549 B
Objective-C
//
|
|
// 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
|