Implemented Evaluation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user