|
@@ -90,17 +90,6 @@ const std::unordered_set<std::string>* kReservedNames =
|
|
"transient", "try", "void", "volatile", "while",
|
|
"transient", "try", "void", "volatile", "while",
|
|
});
|
|
});
|
|
|
|
|
|
-// Names that should be avoided as field names in Kotlin.
|
|
|
|
-// All Kotlin hard keywords are in this list.
|
|
|
|
-const std::unordered_set<std::string>* kKotlinForbiddenNames =
|
|
|
|
- new std::unordered_set<std::string>({
|
|
|
|
- "as", "as?", "break", "class", "continue", "do", "else",
|
|
|
|
- "false", "for", "fun", "if", "in", "!in", "interface",
|
|
|
|
- "is", "!is", "null", "object", "package", "return", "super",
|
|
|
|
- "this", "throw", "true", "try", "typealias", "typeof", "val",
|
|
|
|
- "var", "when", "while",
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
bool IsForbidden(const std::string& field_name) {
|
|
bool IsForbidden(const std::string& field_name) {
|
|
for (int i = 0; i < GOOGLE_ARRAYSIZE(kForbiddenWordList); ++i) {
|
|
for (int i = 0; i < GOOGLE_ARRAYSIZE(kForbiddenWordList); ++i) {
|
|
if (field_name == kForbiddenWordList[i]) {
|
|
if (field_name == kForbiddenWordList[i]) {
|