Archived
1

Implemented Evaluation

This commit is contained in:
Kim Wittenburg
2014-09-07 16:46:37 +02:00
parent 08a6db827f
commit 205de83a28
2 changed files with 7 additions and 23 deletions

View File

@@ -7,6 +7,7 @@
//
#import "NSString+MPExpressionElement.h"
#import "MPElementParser.h"
@implementation NSString (MPExpressionElement)
@@ -20,30 +21,9 @@
return NO;
}
- (double)doubleValue
- (NSDecimalNumber *)evaluate:(MPParseError *__autoreleasing *)error
{
#warning Unimplemented Method
return 0;
}
- (float)floatValue
{
return (float)[self doubleValue];
}
- (int)intValue
{
return (int)[self doubleValue];
}
- (NSInteger)integerValue
{
return (NSInteger)[self doubleValue];
}
- (long long)longLongValue
{
return (long long)[self doubleValue];
return [[[MPElementParser alloc] init] parseElement:self error:error].standaloneValue;
}
@end