File tree Expand file tree Collapse file tree
OCCategory/NSString+VVSyntax Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ -(void) captureReturnType
2121 self.hasReturn = NO ;
2222 } else if ([funcSignatureWithoutParams vv_matchesPatternRegexPattern: @" s*->\\ s*" ]) {
2323 self.hasReturn = YES ;
24- } else if ([funcSignatureWithoutParams vv_matchesPatternRegexPattern: @" ^\\ s*(.*\\ s+)?init\\ s*" ]) {
24+ } else if ([funcSignatureWithoutParams vv_matchesPatternRegexPattern: @" ^\\ s*(.*\\ s+)?( init|subscript) \\ s*" ]) {
2525 self.hasReturn = YES ;
2626 } else {
2727 self.hasReturn = NO ;
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ -(BOOL) vv_isComplieKeyword
7171
7272-(BOOL ) vv_isSwiftFunction
7373{
74- return ![self vv_isObjCMethod ] && ![self vv_isSwiftProperty ] && [self vv_matchesPatternRegexPattern: @" ^\\ s*(.*\\ s+)?(func\\ s+)|(init|deinit)" ];
74+ return ![self vv_isObjCMethod ] && ![self vv_isSwiftProperty ] && [self vv_matchesPatternRegexPattern: @" ^\\ s*(.*\\ s+)?(func\\ s+)|(init|deinit|subscript )" ];
7575}
7676
7777-(BOOL ) vv_isSwiftEnum
You can’t perform that action at this time.
0 commit comments