Added support for termination macros for method declaration and properties declaration #143

wants to merge 2 commits into

2 participants



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.


Forget about this one. It does not handle well methods without any argument, but with a termination macro.

@groue groue closed this Oct 15, 2011

Cool, will wait for fix if you implement one. These things tend to be tricky and GHUnit stopped working on me... Time to change to SenTest I guess - with Xcode 4 it's working quite well...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment