Fundamental Redesign of Evaluation
This commit is contained in:
@@ -9,31 +9,25 @@
|
||||
#import "MPFunction+MPToken.h"
|
||||
|
||||
#import "MPExpression.h"
|
||||
#import "MPPowerFunction.h"
|
||||
|
||||
@implementation MPFunction (MPToken)
|
||||
|
||||
- (MPTokenType)tokenType
|
||||
{
|
||||
return MPGenericFunctionToken;
|
||||
return [self isMemberOfClass:[MPPowerFunction class]] ? MPPowerToken : MPGenericFunctionToken;
|
||||
}
|
||||
|
||||
|
||||
- (NSRange)range
|
||||
{
|
||||
NSUInteger selfIndex = [self.parent indexOfElement:self];
|
||||
return NSMakeRange([self.parent convertIndex:selfIndex
|
||||
return NSMakeRange([self.parent convertIndex:[self.parent indexOfElement:self]
|
||||
fromReferenceFrame:MPElementReferenceFrame
|
||||
toReferenceFrame:MPSymbolReferenceFrame],
|
||||
1);
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)exists
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)stringValue
|
||||
{
|
||||
return [self description];
|
||||
|
||||
Reference in New Issue
Block a user