Cleaned Code by Removing Location Tracking for Errors
This commit is contained in:
@@ -8,9 +8,7 @@
|
||||
|
||||
#import "MPUnexpectedSymbolValue.h"
|
||||
|
||||
@implementation MPUnexpectedSymbolValue {
|
||||
NSRange _range;
|
||||
}
|
||||
@implementation MPUnexpectedSymbolValue
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
@@ -25,7 +23,6 @@
|
||||
self = [self init];
|
||||
if (self) {
|
||||
[tokenStream beginIgnoringWhitespaceTokens];
|
||||
_range = tokenStream.currentToken.range;
|
||||
_symbol = tokenStream.currentToken.stringValue;
|
||||
[tokenStream currentTokenConsumed];
|
||||
[tokenStream endIgnoringOrAcceptingWhitespaceTokens];
|
||||
@@ -33,15 +30,12 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSRange)range
|
||||
{
|
||||
return _range;
|
||||
}
|
||||
|
||||
- (BOOL)validate:(MPParseError *__autoreleasing *)error
|
||||
- (BOOL)validate:(NSError *__autoreleasing *)error
|
||||
{
|
||||
if (error) {
|
||||
*error = MPParseError(self.range, @"Unknown Symbol.");
|
||||
*error = MPParseError(10,
|
||||
NSLocalizedString(@"Unknown Symbol.", @"Error message. Displayed when an unknown symbol was encountered during parsing."),
|
||||
nil);
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user