Skip to content

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

merged 1 commit into from Oct 18, 2011

2 participants

groue commented Oct 15, 2011

Hi, this pull request is the good one :-)

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

- (id)foo MACRO;
- (id)bar:(id)baz MACRO;
@property int p1 MACRO;
@property 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.

@tomaz tomaz merged commit 983dc48 into tomaz:master Oct 18, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.