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:
Doug Gregor
2014-03-17 20:34:48 +00:00
parent 444efcb8f8
commit e5fff12bf0
12 changed files with 672 additions and 51 deletions

View File

@@ -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;
}