Add missing keywords in swift (#4153)

This commit is contained in:
Arun 2019-10-15 11:03:13 +05:30 committed by William Cheng
parent 9c6b94c292
commit dfabb1503a

View File

@ -136,6 +136,7 @@ public class SwiftClientCodegen extends DefaultCodegen implements CodegenConfig
"ErrorResponse", "ErrorResponse",
// swift keywords // swift keywords
// https://docs.swift.org/swift-book/ReferenceManual/LexicalStructure.html Section: Keywords and Punctuation
"Int", "Int32", "Int64", "Int64", "Float", "Double", "Bool", "Void", "String", "Character", "AnyObject", "Int", "Int32", "Int64", "Int64", "Float", "Double", "Bool", "Void", "String", "Character", "AnyObject",
"class", "Class", "break", "as", "associativity", "deinit", "case", "dynamicType", "convenience", "enum", "continue", "class", "Class", "break", "as", "associativity", "deinit", "case", "dynamicType", "convenience", "enum", "continue",
"false", "dynamic", "extension", "default", "is", "didSet", "func", "do", "nil", "final", "import", "else", "false", "dynamic", "extension", "default", "is", "didSet", "func", "do", "nil", "final", "import", "else",
@ -143,7 +144,8 @@ public class SwiftClientCodegen extends DefaultCodegen implements CodegenConfig
"true", "lazy", "operator", "in", "COLUMN", "left", "private", "return", "FILE", "mutating", "protocol", "true", "lazy", "operator", "in", "COLUMN", "left", "private", "return", "FILE", "mutating", "protocol",
"switch", "FUNCTION", "none", "public", "where", "LINE", "nonmutating", "static", "while", "optional", "switch", "FUNCTION", "none", "public", "where", "LINE", "nonmutating", "static", "while", "optional",
"struct", "override", "subscript", "postfix", "typealias", "precedence", "var", "prefix", "Protocol", "struct", "override", "subscript", "postfix", "typealias", "precedence", "var", "prefix", "Protocol",
"required", "right", "set", "Type", "unowned", "weak", "Data") "required", "right", "set", "Type", "unowned", "weak", "Data","fileprivate", "open", "rethrows", "defer",
"guard", "repeat", "Any", "catch", "throw", "throws", "try", "indirect", "willSet")
); );
typeMapping = new HashMap<String, String>(); typeMapping = new HashMap<String, String>();