Cleaned Code by Removing Location Tracking for Errors
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user