Archived
1
This repository has been archived on 2022-08-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
mathpad/MathPad/MPExpressionEvaluator.h
2014-09-06 01:54:15 +02:00

31 lines
797 B
Objective-C

//
// MPExpressionEvaluator.h
// MathPad
//
// Created by Kim Wittenburg on 31.08.14.
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MPExpression.h"
@class MPExpressionEvaluator, MPExpression, MPParsedElement;
@interface MPExpressionEvaluator : NSObject
- (instancetype)initWithExpression:(MPExpression *)expression;
@property (readonly, nonatomic, strong) MPExpression *expression;
#pragma mark Lexing
- (MPParsedElement *)structuredRepresentationOfElementAtIndex:(NSUInteger)index;
#pragma mark Evaluating Expressions
@property (readonly, nonatomic, strong) NSDictionary *variableBindings;
- (void)bindValue:(double)value toVariableName:(NSString *)name;
- (double)evaluateWithError:(NSError *__autoreleasing *)error;
@end