Cleaned Code
This commit is contained in:
@@ -46,11 +46,18 @@
|
||||
|
||||
- (BOOL)validate:(MPParseError *__autoreleasing *)error
|
||||
{
|
||||
if (_factors.count == 0) {
|
||||
if (error) {
|
||||
*error = MPParseError(_range, @"Expected Value");
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
MPFactor *factor = _factors[0];
|
||||
if (factor.hasMultiplicationSymbol) {
|
||||
if (error) {
|
||||
*error = MPParseError(factor.multiplicationSymbolRange, @"Unexpected Symbol.");
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
if (![factor.value validate:error]) {
|
||||
return NO;
|
||||
|
||||
Reference in New Issue
Block a user