mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add option to split Objective-C selectors based on the last preposition.
The frontend option -split-objc-selectors splits the first part of an Objective-C selector into both a function name and the first parameter name at the last preposition. For example, this Objective-C method: - (NSString *)stringByPaddingToLength:(NSUInteger)newLength withString:(NSString *)padString startingAtIndex:(NSUInteger)padIndex is imported as func stringByPadding toLength(newLength: Int) withString(padString: String) startingAtIndex(padIndex: Int) -> String Swift SVN r15156
This commit is contained in:
@@ -533,6 +533,7 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
}
|
||||
|
||||
Opts.EnableObjCOptional = Args.hasArg(OPT_enable_objc_optional);
|
||||
Opts.SplitPrepositions = Args.hasArg(OPT_split_objc_selectors);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user