Omit needless words: allow removal of words following a gerund.

Identify gerunds by stripping off the "ing" and looking for a
verb. This lets us transform, e.g., "stringByAppendingString" to
"stringByAppending", since "append" is a verb.

Swift SVN r31660
This commit is contained in:
Doug Gregor
2015-09-03 05:44:20 +00:00
parent 271fc2057e
commit c3497fb378
4 changed files with 39 additions and 1 deletions

View File

@@ -40,7 +40,8 @@ namespace swift {
enum class PartOfSpeech {
Unknown,
Preposition,
Verb
Verb,
Gerund,
};
/// Determine the part of speech for the given word.