Fundamental Redesign of Evaluation
This commit is contained in:
34
MathPad/MPParsedExpression.h
Normal file
34
MathPad/MPParsedExpression.h
Normal file
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// MPParsedExpression.h
|
||||
// MathPad
|
||||
//
|
||||
// Created by Kim Wittenburg on 14.11.14.
|
||||
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
|
||||
//
|
||||
|
||||
@class MPParsedExpression, MPTokenStream, MPTerm;
|
||||
@protocol MPToken;
|
||||
|
||||
/*!
|
||||
@const MPMathKitErrorDomain
|
||||
@brief Predefined error domain for errors from the MathKit framework.
|
||||
|
||||
@discussion Errors in MathKit can occur during parsing of expressions or
|
||||
during evaluation of expressions. These two can be distinguished
|
||||
by the error code. Parsing errors have lower error codes.
|
||||
Evaluation errors (math errors) have error codes from @c 100 upwards.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString *const MPMathKitErrorDomain;
|
||||
|
||||
FOUNDATION_EXPORT NSString *const MPPathToExpressionKey;
|
||||
FOUNDATION_EXPORT NSString *const MPErrorIndexKey;
|
||||
|
||||
|
||||
@interface MPParsedExpression : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSString *definedVariable;
|
||||
@property (nonatomic, strong) MPTerm *term;
|
||||
|
||||
- (NSDecimalNumber *)evaluate:(NSError *__autoreleasing *)error;
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user