@@ -113,7 +113,7 @@ - (NSString*)tokenName:(sbjson_token_t)token {
113113}
114114
115115- (void )handleObjectStart {
116- [_delegate parserFoundObjectStart: self ];
116+ [_delegate parserFoundObjectStart ];
117117 [_stateStack addObject: _state];
118118 _state = [SBJsonStreamParserStateObjectStart sharedInstance ];
119119}
@@ -122,11 +122,11 @@ - (void)handleObjectEnd: (sbjson_token_t) tok {
122122 _state = [_stateStack lastObject ];
123123 [_stateStack removeLastObject ];
124124 [_state parser: self shouldTransitionTo: tok];
125- [_delegate parserFoundObjectEnd: self ];
125+ [_delegate parserFoundObjectEnd ];
126126}
127127
128128- (void )handleArrayStart {
129- [_delegate parserFoundArrayStart: self ];
129+ [_delegate parserFoundArrayStart ];
130130 [_stateStack addObject: _state];
131131 _state = [SBJsonStreamParserStateArrayStart sharedInstance ];
132132}
@@ -135,7 +135,7 @@ - (void)handleArrayEnd: (sbjson_token_t) tok {
135135 _state = [_stateStack lastObject ];
136136 [_stateStack removeLastObject ];
137137 [_state parser: self shouldTransitionTo: tok];
138- [_delegate parserFoundArrayEnd: self ];
138+ [_delegate parserFoundArrayEnd ];
139139}
140140
141141- (void ) handleTokenNotExpectedHere : (sbjson_token_t ) tok {
@@ -144,7 +144,7 @@ - (void) handleTokenNotExpectedHere: (sbjson_token_t) tok {
144144
145145 _state = [SBJsonStreamParserStateError sharedInstance ];
146146 id ui = @{ NSLocalizedDescriptionKey : [NSString stringWithFormat: @" Token '%@ ' not expected %@ " , tokenName, stateName]};
147- [_delegate parser: self foundError : [NSError errorWithDomain: @" org.sbjson.parser" code: 2 userInfo: ui]];
147+ [_delegate parserFoundError : [NSError errorWithDomain: @" org.sbjson.parser" code: 2 userInfo: ui]];
148148}
149149
150150- (SBJsonParserStatus)parse : (NSData *)data_ {
@@ -170,7 +170,8 @@ - (SBJsonParserStatus)parse:(NSData *)data_ {
170170
171171 case sbjson_token_error:
172172 _state = [SBJsonStreamParserStateError sharedInstance ];
173- [_delegate parser: self foundError: [NSError errorWithDomain: @" org.sbjson.parser" code: 3 userInfo: @{ NSLocalizedDescriptionKey : tokeniser.error }]];
173+ [_delegate parserFoundError: [NSError errorWithDomain: @" org.sbjson.parser" code: 3
174+ userInfo: @{NSLocalizedDescriptionKey : tokeniser.error }]];
174175 return SBJsonParserError;
175176 break ;
176177
@@ -204,23 +205,23 @@ - (SBJsonParserStatus)parse:(NSData *)data_ {
204205 break ;
205206
206207 case sbjson_token_bool:
207- [_delegate parser: self foundBoolean : token[0 ] == ' t' ];
208+ [_delegate parserFoundBoolean : token[0 ] == ' t' ];
208209 [_state parser: self shouldTransitionTo: tok];
209210 break ;
210211
211212
212213 case sbjson_token_null:
213- [_delegate parserFoundNull: self ];
214+ [_delegate parserFoundNull ];
214215 [_state parser: self shouldTransitionTo: tok];
215216 break ;
216217
217218 case sbjson_token_integer: {
218219 const int UNSIGNED_LONG_LONG_MAX_DIGITS = 20 ;
219220 if (token_len <= UNSIGNED_LONG_LONG_MAX_DIGITS) {
220221 if (*token == ' -' )
221- [_delegate parser: self foundNumber: @(strtoll (token, NULL , 10 ))];
222+ [_delegate parserFoundNumber: @(strtoll (token, NULL , 10 ))];
222223 else
223- [_delegate parser: self foundNumber: @(strtoull (token, NULL , 10 ))];
224+ [_delegate parserFoundNumber: @(strtoull (token, NULL , 10 ))];
224225
225226 [_state parser: self shouldTransitionTo: tok];
226227 break ;
@@ -229,27 +230,27 @@ - (SBJsonParserStatus)parse:(NSData *)data_ {
229230 // FALLTHROUGH
230231
231232 case sbjson_token_real: {
232- [_delegate parser: self foundNumber: @(strtod (token, NULL ))];
233+ [_delegate parserFoundNumber: @(strtod (token, NULL ))];
233234 [_state parser: self shouldTransitionTo: tok];
234235 break ;
235236 }
236237
237238 case sbjson_token_string: {
238239 NSString *string = [[NSString alloc ] initWithBytes: token length: token_len encoding: NSUTF8StringEncoding];
239240 if ([_state needKey ])
240- [_delegate parser: self foundObjectKey : string];
241+ [_delegate parserFoundObjectKey : string];
241242 else
242- [_delegate parser: self foundString : string];
243+ [_delegate parserFoundString : string];
243244 [_state parser: self shouldTransitionTo: tok];
244245 break ;
245246 }
246247
247248 case sbjson_token_encoded: {
248249 NSString *string = [self decodeStringToken: token length: token_len];
249250 if ([_state needKey ])
250- [_delegate parser: self foundObjectKey : string];
251+ [_delegate parserFoundObjectKey : string];
251252 else
252- [_delegate parser: self foundString : string];
253+ [_delegate parserFoundString : string];
253254 [_state parser: self shouldTransitionTo: tok];
254255 break ;
255256 }
0 commit comments