Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
127 lines (124 sloc) 2.38 KB
//
// SwiftKeyword.swift
// SearchController
//
// Created by Ben Chatelain on 5/9/16.
// Copyright © 2016 Ben Chatelain. All rights reserved.
//
/// List of reserved Swift keywords, surrounded with backticks so that they can
/// be used as enum member values.
/// https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/TheBasics.html#//apple_ref/doc/uid/TP40014097-CH5-NoLink_29
enum SwiftKeyword: String {
case `associativity`
case `break`
case `case`
case `catch`
case `class`
case `continue`
case `convenience`
case `default`
case `deinit`
case `didSet`
case `do`
case `else`
case `enum`
case `extension`
case `fallthrough`
case `false`
case `final`
case `for`
case `func`
case `get`
case `guard`
case `if`
case `in`
case `infix`
case `inout`
case `internal`
case `lazy`
case `let`
case `mutating`
case `nil`
case `operator`
case `override`
case `postfix`
case `precedence`
case `prefix`
case `private`
case `public`
case `repeat`
case `required`
case `return`
case `self`
case `set`
case `static`
case `struct`
case `subscript`
case `super`
case `switch`
case `throws`
case `true`
case `try`
case `var`
case `weak`
case `where`
case `while`
case `willSet`
static let allValues = [
`associativity`,
`break`,
`case`,
`catch`,
`class`,
`continue`,
`convenience`,
`default`,
`deinit`,
`didSet`,
`do`,
`else`,
`enum`,
`extension`,
`fallthrough`,
`false`,
`final`,
`for`,
`func`,
`get`,
`guard`,
`if`,
`in`,
`infix`,
`inout`,
`internal`,
`lazy`,
`let`,
`mutating`,
`nil`,
`operator`,
`override`,
`postfix`,
`precedence`,
`prefix`,
`private`,
`public`,
`repeat`,
`required`,
`return`,
`self`,
`set`,
`static`,
`struct`,
`subscript`,
`super`,
`switch`,
`throws`,
`true`,
`try`,
`var`,
`weak`,
`where`,
`while`,
`willSet`
]
}