|
44 | 44 | `(,(regexp-opt '("class" "init" "deinit" "extension" "fileprivate" "func"
|
45 | 45 | "import" "let" "protocol" "static" "struct" "subscript"
|
46 | 46 | "typealias" "enum" "var" "lazy" "where"
|
47 |
| - "private" "public" "internal" "override" "throws" |
48 |
| - "open" "associatedtype") |
| 47 | + "private" "public" "internal" "override" "throws" "rethrows" |
| 48 | + "open" "associatedtype" "inout" "indirect" "final") |
| 49 | + 'words) . font-lock-keyword-face) |
| 50 | + ;; Variable decl keywords |
| 51 | + `("\\b\\(?:[^a-zA-Z_0-9]*\\)\\(get\\|set\\)\\(?:[^a-zA-Z_0-9]*\\)\\b" 1 font-lock-keyword-face) |
| 52 | + `(,(regexp-opt '("willSet" "didSet") 'words) . font-lock-keyword-face) |
| 53 | + ;; Operators |
| 54 | + `("\\b\\(?:\\(?:pre\\|post\\|in\\)fix\\s-+\\)operator\\b" . font-lock-keyword-face) |
| 55 | + ;; Keywords that begin with a number sign |
| 56 | + `("#\\(if\\|endif\\|elseif\\|else\\|available\\)\\b" . font-lock-string-face) |
| 57 | + `("#\\(file\\|line\\|column\\|function\\|selector\\)\\b" . font-lock-keyword-face) |
| 58 | + ;; Infix operator attributes |
| 59 | + `(,(regexp-opt '("precedence" "associativity" "left" "right" "none") |
49 | 60 | 'words) . font-lock-keyword-face)
|
50 | 61 | ;; Statements
|
51 |
| - `(,(regexp-opt '("if" "guard" "in" "else" "for" "do" "repeat" "while" "return" |
52 |
| - "break" "continue" "switch" "case" "default" |
53 |
| - "throw" "try" "catch") |
| 62 | + `(,(regexp-opt '("if" "guard" "in" "else" "for" "do" "repeat" "while" |
| 63 | + "return" "break" "continue" "fallthrough" "switch" "case" |
| 64 | + "default" "throw" "defer" "try" "catch") |
| 65 | + 'words) . font-lock-keyword-face) |
| 66 | + ;; Decl modifier keywords |
| 67 | + `(,(regexp-opt '("convenience" "dynamic" "mutating" "nonmutating" "optional" |
| 68 | + "required" "weak" "unowned" "safe" "unsafe") |
54 | 69 | 'words) . font-lock-keyword-face)
|
55 | 70 | ;; Expressions
|
56 | 71 | `(,(regexp-opt '("new") 'words) . font-lock-keyword-face)
|
|
0 commit comments