From c31bb1eab8c721b1cafc9cf06d51167281dde563 Mon Sep 17 00:00:00 2001 From: Philip Turner Date: Sun, 26 Dec 2021 13:49:09 -0500 Subject: [PATCH] Fix the all-caps keywords that changes to words prefixed by # --- src/basic-languages/swift/swift.ts | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/basic-languages/swift/swift.ts b/src/basic-languages/swift/swift.ts index dcf15251..66513122 100644 --- a/src/basic-languages/swift/swift.ts +++ b/src/basic-languages/swift/swift.ts @@ -57,14 +57,32 @@ export const language = { ], accessmodifiers: ['public', 'private', 'fileprivate', 'internal'], keywords: [ - '__COLUMN__', - '__FILE__', - '__FUNCTION__', - '__LINE__', + '#available', + '#colorLiteral', + '#column', + '#dsohandle', + '#else', + '#elseif', + '#endif', + '#error', + '#file', + '#fileID', + '#fileLiteral', + '#filePath', + '#function', + '#if', + '#imageLiteral', + '#keyPath', + '#line', + '#selector', + '#sourceLocation', + '#warning', + 'Any', 'Protocol', 'Self', 'Type', + 'actor', 'as', 'assignment', @@ -152,9 +170,7 @@ export const language = { 'weak', 'where', 'while', - 'willSet', - 'FALSE', - 'TRUE' + 'willSet' ], symbols: /[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/,