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/MathPad/MPFunction+MPToken.m
2014-11-10 21:45:50 +01:00

43 lines
734 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"
#import "MPExpression.h"
@implementation MPFunction (MPToken)
- (MPTokenType)tokenType
{
return MPGenericFunctionToken;
}
- (NSRange)range
{
NSUInteger selfIndex = [self.parent indexOfElement:self];
return NSMakeRange([self.parent convertIndex:selfIndex
fromReferenceFrame:MPElementReferenceFrame
toReferenceFrame:MPSymbolReferenceFrame],
1);
}
- (BOOL)exists
{
return YES;
}
- (NSString *)stringValue
{
return [self description];
}
@end