Archived
1

Cleaned Code by Removing Location Tracking for Errors

This commit is contained in:
Kim Wittenburg
2014-11-07 19:50:28 +01:00
parent 91e7dbe9f2
commit 139a75f816
59 changed files with 355 additions and 532 deletions

View File

@@ -16,6 +16,11 @@
#import "MPExpressionTokenizer.h"
#import "MPToken.h"
#import "MPExpressionTree.h"
NSString *const MPMathKitErrorDomain = @"MPMathKitErrorDomain";
NSString *const MPExpressionPathErrorKey = @"MPExpressionPathErrorKey";
@interface MPExpression () {
@@ -54,11 +59,6 @@
return [self initWithElements:@[]];
}
- (instancetype)initWithExpressionTree:(MPExpressionTree *)expressionTree
{
return [self initWithElements:expressionTree.expressionElements];
}
- (instancetype)initWithElement:(id<MPExpressionElement>)element
{
return [self initWithElements:@[element]];
@@ -521,7 +521,7 @@
#pragma mark Evaluating Expressions
- (NSDecimalNumber *)evaluateWithError:(MPParseError *__autoreleasing *)error
- (NSDecimalNumber *)evaluateWithError:(NSError *__autoreleasing *)error
{
MPExpressionTree *tree = [self parse];
return [tree validate:error] ? [tree evaluate] : nil;