Upstream: https://github.com/beelsebob/CoreParse/pull/45 Adaptation: update paths, removed tests part commit 601626b30683397fc25dfc155e8192a03c1776d0 Author: Kirill A. Korinsky Date: Fri Dec 3 14:46:54 2021 +0100 Add support macOS 12 diff --git a/optool/FSArgumentParser/CoreParse/CoreParse/Built In Parsers/CPJSONParser.m b/optool/FSArgumentParser/CoreParse/CoreParse/Built In Parsers/CPJSONParser.m index bc2f537..08eab1d 100644 --- a/optool/FSArgumentParser/CoreParse/CoreParse/Built In Parsers/CPJSONParser.m +++ b/optool/FSArgumentParser/CoreParse/CoreParse/Built In Parsers/CPJSONParser.m @@ -142,7 +142,7 @@ case 0: return [(CPQuotedToken *)[children objectAtIndex:0] content]; case 1: - return [(CPNumberToken *)[children objectAtIndex:0] number]; + return [(CPNumberToken *)[children objectAtIndex:0] numberValue]; case 2: case 3: case 4: diff --git a/optool/FSArgumentParser/CoreParse/CoreParse/Grammar/CPGrammar.m b/optool/FSArgumentParser/CoreParse/CoreParse/Grammar/CPGrammar.m index 048fba3..700c706 100644 --- a/optool/FSArgumentParser/CoreParse/CoreParse/Grammar/CPGrammar.m +++ b/optool/FSArgumentParser/CoreParse/CoreParse/Grammar/CPGrammar.m @@ -61,7 +61,7 @@ NSArray *rules = [children objectAtIndex:1]; for (CPRule *r in rules) { - [r setTag:[[(CPNumberToken *)[children objectAtIndex:0] number] intValue]]; + [r setTag:[[(CPNumberToken *)[children objectAtIndex:0] numberValue] intValue]]; } return rules; } diff --git a/optool/FSArgumentParser/CoreParse/CoreParse/Tokenisation/Token Types/CPNumberToken.h b/optool/FSArgumentParser/CoreParse/CoreParse/Tokenisation/Token Types/CPNumberToken.h index a39737b..4a93656 100644 --- a/optool/FSArgumentParser/CoreParse/CoreParse/Tokenisation/Token Types/CPNumberToken.h +++ b/optool/FSArgumentParser/CoreParse/CoreParse/Tokenisation/Token Types/CPNumberToken.h @@ -48,7 +48,7 @@ /** * The number found in the input stream. */ -@property (readwrite,copy) NSNumber *number; +@property (readwrite,copy) NSNumber *numberValue; @end diff --git a/optool/FSArgumentParser/CoreParse/CoreParse/Tokenisation/Token Types/CPNumberToken.m b/optool/FSArgumentParser/CoreParse/CoreParse/Tokenisation/Token Types/CPNumberToken.m index f99ed7a..c0375ee 100644 --- a/optool/FSArgumentParser/CoreParse/CoreParse/Tokenisation/Token Types/CPNumberToken.m +++ b/optool/FSArgumentParser/CoreParse/CoreParse/Tokenisation/Token Types/CPNumberToken.m @@ -10,7 +10,7 @@ @implementation CPNumberToken -@synthesize number; +@synthesize numberValue; + (id)tokenWithNumber:(NSNumber *)number { @@ -23,7 +23,7 @@ if (nil != self) { - [self setNumber:initNumber]; + [self setNumberValue:initNumber]; } return self; @@ -36,13 +36,13 @@ - (void)dealloc { - [number release]; + [numberValue release]; [super dealloc]; } - (NSString *)description { - return [NSString stringWithFormat:@"", [self number]]; + return [NSString stringWithFormat:@"", [self numberValue]]; } - (NSString *)name @@ -52,7 +52,7 @@ - (NSUInteger)hash { - return [[self number] hash]; + return [[self numberValue] hash]; } - (BOOL)isNumberToken @@ -63,7 +63,7 @@ - (BOOL)isEqual:(id)object { return ([object isNumberToken] && - [((CPNumberToken *)object)->number isEqualToNumber:number]); + [((CPNumberToken *)object)->numberValue isEqualToNumber:numberValue]); } @end