Skip to content

Commit

Permalink
Various syntax tweaks and changes to get the newest addition in line …
Browse files Browse the repository at this point in the history
…with the overall project format + cleanup.
  • Loading branch information
stefanceriu committed Apr 16, 2016
1 parent 4bab340 commit aac5f88
Show file tree
Hide file tree
Showing 7 changed files with 160 additions and 240 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@

#import "DVTSourceCodeLanguage.h"

typedef NS_ENUM(NSInteger, DVTSourceCodeLanguageKind)
{
typedef NS_ENUM(NSInteger, DVTSourceCodeLanguageKind) {
DVTSourceCodeLanguageKindOther,
DVTSourceCodeLanguageKindObjectiveC,
DVTSourceCodeLanguageKindSwift,
DVTSourceCodeLanguageKindOthers
DVTSourceCodeLanguageKindSwift
};

@interface DVTSourceCodeLanguage (SCXCodeSwitchExpander)

/// Returns a kind of language which this instance means.
@property (readonly) DVTSourceCodeLanguageKind kind;
@property (readonly) DVTSourceCodeLanguageKind switchExpander_sourceCodeLanguageKind;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,16 @@

@implementation DVTSourceCodeLanguage (SCXCodeSwitchExpander)

- (DVTSourceCodeLanguageKind)kind
- (DVTSourceCodeLanguageKind)switchExpander_sourceCodeLanguageKind
{
if ([self.languageName isEqualToString:@"Objective-C"])
{
if ([self.languageName isEqualToString:@"Objective-C"]) {
return DVTSourceCodeLanguageKindObjectiveC;
}
else if ([self.languageName isEqualToString:@"Swift"])
{
else if ([self.languageName isEqualToString:@"Swift"]) {
return DVTSourceCodeLanguageKindSwift;
}
else
{
return DVTSourceCodeLanguageKindOthers;
}

return DVTSourceCodeLanguageKindOther;
}

@end
Loading

0 comments on commit aac5f88

Please sign in to comment.