tomaz/appledoc — pull request #143 by groue (2011-10-15 10:19:49+00:00)
Title: Added support for termination macros for method declaration and properties declaration

Hi,

appledoc was not able to properly parse custom termination macros, such as the following declaration:

- (NSString *)foo:(id)bar MACRO;
@property (nonatomic, readonly) int p1 MACRO;
@property (nonatomic, readonly) void(^p2)(void) MACRO;

This pull request adds the following method to the `GBTokenizer` class:

- (void)lookaheadTo:(NSString *)end usingBlock:(void (^)(PKToken *token, BOOL *stop))block;

This method allows `[GBObjectiveCParser matchMethodDataForProvider:from:to:required:]` to look ahead an argument name for further colons `:`. If there is none, remaining tokens are handled as termination macros.

Also, `[GBMethodData propertyDataWithAttributes:components:]` has been enhanced in order to set the property name apart from the return type, without help from `[GBObjectiveCParser matchPropertyDefinitionForProvider:required:]` in the specific case of block properties.