Skip to content

Commit f847923

Browse files
committed
Highlight more compiler directives
1 parent 71c82e9 commit f847923

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

swift-mode-font-lock.el

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -548,9 +548,9 @@ Return nil otherwise."
548548
"Keywords used as constants.")
549549

550550
(defconst swift-mode:preprocessor-keywords
551-
'("#available" "#colorLiteral" "#column" "#else" "#elseif" "#endif"
552-
"#fileLiteral" "#file" "#function" "#if" "#imageLiteral" "#keypath" "#line"
553-
"#selector" "#sourceLocation")
551+
'("#available" "#colorLiteral" "#column" "#dsohandle" "#else" "#elseif"
552+
"#endif" "#error" "#file" "#fileLiteral" "#function" "#if" "#imageLiteral"
553+
"#keyPath" "#line" "#selector" "#sourceLocation" "#warning")
554554
"Keywords that begin with a number sign (#).")
555555

556556
(defconst swift-mode:declaration-keywords
@@ -580,8 +580,10 @@ Excludes true, false, and keywords begin with a number sign.")
580580
"Keywords reserved in particular contexts.")
581581

582582
(defconst swift-mode:build-config-keywords
583-
'("os" "arch" "swift" "OSX" "iOS" "watchOS" "tvOS" "i386" "x86_64" "arm"
584-
"arm64" "iOSApplicationExtension" "OSXApplicationExtension")
583+
'("os" "arch" "swift" "compiler" "canImport" "targetEnvironment"
584+
"OSX" "macOS" "iOS" "watchOS" "tvOS" "i386" "x86_64" "arm" "arm64"
585+
"iOSApplicationExtension" "OSXApplicationExtension"
586+
"macOSApplicationExtension" "simulator")
585587
"Keywords for build configuration statements.")
586588

587589
(defconst swift-mode:standard-precedence-groups

0 commit comments

Comments
 (0)