|
50 | 50 | ;; Decl and type keywords
|
51 | 51 | `(,(regexp-opt '("class" "init" "deinit" "extension" "fileprivate" "func"
|
52 | 52 | "import" "let" "protocol" "static" "struct" "subscript"
|
53 |
| - "typealias" "enum" "var" "lazy" "where" |
54 |
| - "private" "public" "internal" "override" "throws" "rethrows" |
55 |
| - "open" "associatedtype" "inout" "indirect" "final") |
| 53 | + "typealias" "enum" "var" "lazy" "where" "private" "public" |
| 54 | + "internal" "override" "open" "associatedtype" "inout" |
| 55 | + "indirect" "final") |
56 | 56 | 'words) . font-lock-keyword-face)
|
57 | 57 | ;; Variable decl keywords
|
58 | 58 | `("\\b\\(?:[^a-zA-Z_0-9]*\\)\\(get\\|set\\)\\(?:[^a-zA-Z_0-9]*\\)\\b" 1 font-lock-keyword-face)
|
|
68 | 68 | ;; Statements
|
69 | 69 | `(,(regexp-opt '("if" "guard" "in" "else" "for" "do" "repeat" "while"
|
70 | 70 | "return" "break" "continue" "fallthrough" "switch" "case"
|
71 |
| - "default" "throw" "defer" "try" "catch") |
| 71 | + "default" "defer" "catch") |
72 | 72 | 'words) . font-lock-keyword-face)
|
73 | 73 | ;; Decl modifier keywords
|
74 | 74 | `(,(regexp-opt '("convenience" "dynamic" "mutating" "nonmutating" "optional"
|
75 | 75 | "required" "weak" "unowned" "safe" "unsafe")
|
76 | 76 | 'words) . font-lock-keyword-face)
|
| 77 | + ;; Expression keywords: "Any" and "Self" are included in "Types" above |
| 78 | + `(,(regexp-opt '("as" "false" "is" "nil" "rethrows" "super" "self" "throw" |
| 79 | + "true" "try" "throws") |
| 80 | + 'words) . font-lock-keyword-face) |
77 | 81 | ;; Expressions
|
78 | 82 | `(,(regexp-opt '("new") 'words) . font-lock-keyword-face)
|
79 |
| - ;; Special Variables |
80 |
| - '("self" . font-lock-keyword-face) |
81 | 83 | ;; Variables
|
82 | 84 | '("[a-zA-Z_][a-zA-Z_0-9]*" . font-lock-variable-name-face)
|
83 | 85 | ;; Unnamed variables
|
|
0 commit comments