Skip to content

Commit fa96528

Browse files
committed
Fix void arg in block define
1 parent 2fcf407 commit fa96528

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

VVDocumenter-Xcode/Commenter/VVBaseCommenter.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ -(void) parseArguments
133133
while ([[tempArgs lastObject] isEqualToString:@" "]) {
134134
[tempArgs removeLastObject];
135135
}
136+
136137
arg.name = [tempArgs lastObject];
137138

138139
[tempArgs removeLastObject];

VVDocumenter-Xcode/Commenter/VVFunctionCommenter.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88

99
#import "VVFunctionCommenter.h"
10+
#import "VVArgument.h"
1011

1112
@implementation VVFunctionCommenter
1213

@@ -22,6 +23,14 @@ -(void) captureReturnType
2223
-(void) captureParameters
2324
{
2425
[self parseArguments];
26+
27+
//Remove void arg in block
28+
NSArray *tempArray = [NSArray arrayWithArray:self.arguments];
29+
[tempArray enumerateObjectsUsingBlock:^(VVArgument *arg, NSUInteger idx, BOOL *stop) {
30+
if ([arg.type isEqualToString:@""] && [arg.name isEqualToString:@"void"]) {
31+
[self.arguments removeObject:arg];
32+
}
33+
}];
2534
}
2635

2736
-(NSString *) document

0 commit comments

Comments
 (0)