33 lines
796 B
Objective-C
33 lines
796 B
Objective-C
//
|
|
// MPParseError.h
|
|
// MathPad
|
|
//
|
|
// Created by Kim Wittenburg on 08.09.14.
|
|
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
|
|
//
|
|
|
|
// TODO: Rename to MPSyntaxError
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
@class MPRangePath;
|
|
|
|
#define MPParseError(range,key) [[MPParseError alloc] initWithErrorRange:range errorMessageKey:key]
|
|
|
|
@interface MPParseError : NSObject
|
|
|
|
- (instancetype)initWithErrorRange:(NSRange)errorRange
|
|
errorMessageKey:(NSString *)key;
|
|
|
|
- (instancetype)initWithErrorRange:(NSRange)errorRange
|
|
localizederrorMessage:(NSString *)errorMessage;
|
|
|
|
@property (nonatomic, strong) NSIndexPath *pathToExpression;
|
|
|
|
@property (nonatomic) NSRange errorRange;
|
|
@property (nonatomic, copy) NSString *localizedErrorMessage;
|
|
|
|
- (MPRangePath *)rangePath;
|
|
|
|
@end
|