Simplify getPrepositionKind to isPreposition

No one was distinguishing directional and non-directional prepositions
anymore. No functionality change.
This commit is contained in:
Jordan Rose
2019-10-10 19:56:23 -07:00
parent ad8a611206
commit 0f071e28ea
4 changed files with 39 additions and 55 deletions

View File

@@ -44,16 +44,13 @@ bool swift::canBeMemberName(StringRef identifier) {
.Default(true);
}
PrepositionKind swift::getPrepositionKind(StringRef word) {
#define DIRECTIONAL_PREPOSITION(Word) \
if (word.equals_lower(#Word)) \
return PK_Directional;
bool swift::isPreposition(StringRef word) {
#define PREPOSITION(Word) \
if (word.equals_lower(#Word)) \
return PK_Nondirectional;
return true;
#include "PartsOfSpeech.def"
return PK_None;
return false;
}
PartOfSpeech swift::getPartOfSpeech(StringRef word) {