60 Commits

Author SHA1 Message Date
Doug Gregor
2c909b4d36 Remove Objective-C selector splitting options.
We're not going this way.

Swift SVN r27717
2015-04-25 03:59:00 +00:00
John McCall
e880aac1e0 Add a convenience routine for searching for a complete
word within a camelCase identifier.

Basically StringRef::find but requiring the next character
to not be lowercase.

Swift SVN r17658
2014-05-08 00:51:25 +00:00
Doug Gregor
4996efbfba Implement support for making "with" implicit on the first argument of an initializer.
When importing an Objective-C init method or factory method into an
initializer, if the first camelCase word of the first argument name
starts with "with", drop the "with". This means that

  -initWithRed:green:blue:alpha:

will get imported into Swift as

  init(red:green:blue:alpha:)

as will

  +colorWithRed:green:blue:alpha:

This is <rdar://problem/16795899>, hidden behind the
-implicit-objc-with flag.

Swift SVN r17271
2014-05-02 21:13:04 +00:00
Doug Gregor
8324dc92e1 Introduce and use camel_case::appendSentenceCase().
Swift SVN r17260
2014-05-02 17:43:00 +00:00
Doug Gregor
9d7f0b6211 Rework the selector-splitting heuristics.
This makes a number of changes to the selector-splitting
heuristics. Specifically:

  - Eliminate last-word splitting, and with it the notion of
    multi-words. We only split at prepositions now.
  - Introduce the notion of "linking verbs" such as "will" or
    "should"; when these show up, we refuse to split a selector, which
    helps with delegates.
  - Eliminate the special case for "get" and "set". It wasn't
    helping.
  




Swift SVN r16265
2014-04-12 20:32:16 +00:00
Doug Gregor
5d20720e87 Some more camelCase string utilities.
Swift SVN r16053
2014-04-08 15:13:18 +00:00
Doug Gregor
49387beb25 Selector splitting: don't split selectors in the middle of whitelisted "multi-words".
Swift SVN r16016
2014-04-07 19:17:23 +00:00
Doug Gregor
12d0eeb324 Move more of the Clang importer's camelCase logic to the new utilities.
Swift SVN r15843
2014-04-02 23:06:22 +00:00
Doug Gregor
925097a8b0 Add utilities for lower- and sentence-casing camelCase strings.
Swift SVN r15815
2014-04-02 18:29:50 +00:00
Doug Gregor
d6a173fead Add some utilities for working with camelCase names.
Swift SVN r15802
2014-04-02 15:18:32 +00:00