diff --git a/extensions/swift/package.json b/extensions/swift/package.json index b8f262b4cff..a9139a22a6d 100644 --- a/extensions/swift/package.json +++ b/extensions/swift/package.json @@ -3,6 +3,9 @@ "version": "0.1.0", "publisher": "vscode", "engines": { "vscode": "*" }, + "scripts": { + "update-grammar": "node ../../build/npm/update-grammar.js freebroccolo/atom-language-swift grammars/swift.cson ./syntaxes/swift.tmLanguage.json" + }, "contributes": { "languages": [{ "id": "swift", @@ -13,7 +16,7 @@ "grammars": [{ "language": "swift", "scopeName": "source.swift", - "path": "./syntaxes/swift.json" + "path": "./syntaxes/swift.tmLanguage.json" }], "snippets": [{ "language": "swift", diff --git a/extensions/swift/syntaxes/swift.json b/extensions/swift/syntaxes/swift.json deleted file mode 100644 index ffd875717c6..00000000000 --- a/extensions/swift/syntaxes/swift.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "scopeName": "source.swift", - "fileTypes": [ - "swift" - ], - "name": "Swift", - "firstLineMatch": "^#!\\s*/.*\\bswift", - "patterns": [ - { - "name": "keyword.declaration.swift", - "match": "\\b(class|deinit|enum|extension|import|init|inout|internal|let|operator|private|protocol|public|static|struct|subscript|typealias|var)\\b" - }, - { - "name": "keyword.statement.swift", - "match": "\\b(break|case|continue|default|defer|do|else|fallthrough|for|guard|if|in|repeat|return|switch|where|while)\\b" - }, - { - "name": "keyword.expressions-and-types.swift", - "match": "\\b(as|catch|dynamicType|false|is|nil|rethrows|super|self|Self|throw|throws|true|try|__COLUMN__|__FILE__|__FUNCTION__|__LINE__)\\b" - }, - { - "name": "keyword.patterns.swift", - "match": "\\b(_)\\b" - }, - { - "name": "keyword.primitive-datatypes.swift", - "match": "\\b(Int|UInt|String|Bool|Character|Optional|Float|Double)\\b" - }, - { - "name": "keyword.reserved.swift", - "match": "\\b(associativity|convenience|dynamic|didSet|final|get|infix|lazy|left|mutating|none|nonmutating|optional|override|postfix|precedence|prefix|Protocol|required|right|set|Type|unowned|weak|willSet)\\b" - }, - { - "include": "#comment" - }, - { - "include": "#literal" - }, - { - "include": "#function" - }, - { - "include": "#operator" - }, - { - "include": "#attribute" - } - ], - "repository": { - "comment": { - "patterns": [ - { - "name": "comment.block.swift", - "begin": "/\\*", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.begin.swift" - } - }, - "end": "\\*/", - "endCaptures": { - "0": { - "name": "punctuation.definition.comment.end.swift" - } - }, - "patterns": [ - { - "include": "#comment" - } - ] - }, - { - "begin": "(^[ \\t]+)?(?=//)", - "beginCaptures": { - "1": { - "name": "punctuation.whitespace.comment.leading.swift" - } - }, - "end": "(?!\\G)", - "patterns": [ - { - "name": "comment.line.double-slash.swift", - "begin": "//", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.swift" - } - }, - "end": "\\n", - "patterns": [ - { - "name": "punctuation.separator.continuation.swift", - "match": "(?>\\\\\\s*\\n)" - } - ] - } - ] - } - ] - }, - "escaped-char": { - "patterns": [ - { - "name": "constant.character.escape.swift", - "match": "\\\\[0\\\\tnr\"']" - }, - { - "name": "constant.character.escape.swift", - "match": "\\\\(x\\h{2}|u\\h{4}|U\\h{8})" - }, - { - "name": "invalid.illegal.constant.character.escape.swift", - "match": "\\\\[^uxU]" - } - ] - }, - "identifier": { - "match": "(?x) (? \\g \\g? | ` \\g \\g? ` ){0} (? [ a-z A-Z ] | [ \\u00A8 \\u00AA \\u00AD \\u00AF \\u00B2-\\u00B5 \\u00B7-\\u00BA ] | [ \\u00BC-\\u00BE \\u00C0-\\u00D6 \\u00D8-\\u00F6 \\u00F8-\\u00FF ] | [ \\u0100-\\u02FF \\u0370-\\u167F \\u1681-\\u180D \\u180F-\\u1DBF ] | [ \\u1E00-\\u1FFF ] | [ \\u200B-\\u200D \\u202A-\\u202E \\u203F-\\u2040 \\u2054 \\u2060-\\u206F ] | [ \\u2070-\\u20CF \\u2100-\\u218F \\u2460-\\u24FF \\u2776-\\u2793 ] | [ \\u2C00-\\u2DFF \\u2E80-\\u2FFF ] | [ \\u3004-\\u3007 \\u3021-\\u302F \\u3031-\\u303F \\u3040-\\uD7FF ] | [ \\uF900-\\uFD3D \\uFD40-\\uFDCF \\uFDF0-\\uFE1F \\uFE30-\\uFE44 ] | [ \\uFE47-\\uFFFD ] | [ \\u10000-\\u1FFFD \\u20000-\\u2FFFD \\u30000-\\u3FFFD \\u40000-\\u4FFFD ] | [ \\u50000-\\u5FFFD \\u60000-\\u6FFFD \\u70000-\\u7FFFD \\u80000-\\u8FFFD ] | [ \\u90000-\\u9FFFD \\uA0000-\\uAFFFD \\uB0000-\\uBFFFD \\uC0000-\\uCFFFD ] | [ \\uD0000-\\uDFFFD \\uE0000-\\uEFFFD ] ){0} (? \\d | [ \\u0300-\\u036F \\u1DC0-\\u1DFF \\u20D0-\\u20FF \\uFE20-\\uFE2F ] | \\g ){0} (? \\g \\g? ){0} (? (?) \\$ \\d+ (?!\\g) (?# FIXME) ){0} \\g | \\g", - "captures": { - "5": { - "name": "variable.other.positional.swift" - } - } - }, - "literal": { - "patterns": [ - { - "include": "#literal-number" - }, - { - "include": "#literal-string" - }, - { - "include": "#literal-boolean" - } - ] - }, - "literal-number": { - "name": "constant.numeric.swift", - "match": "(?x) (?### INTEGER ###) (? \\g | \\g | \\g | \\g ){0} (?### BINARY ###) (? 0b \\g \\g? ){0} (? [0-1] ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### OCTAL ###) (? 0o \\g \\g? ){0} (? [0-7] ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### DECIMAL ###) (? \\g \\g? ){0} (? \\d ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### HEXADECIMAL ###) (? 0x \\g \\g? ){0} (? \\h ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### FLOATING POINT ###) (? \\g \\g? \\g? | \\g \\g? \\g ){0} (? \\. \\g ){0} (? \\g \\g? \\g ){0} (? \\. \\g? ){0} (? \\g \\g? \\g ){0} (? [eE] ){0} (? [pP] ){0} (? [+-] ){0} (?!0[box]) \\g | \\g" - }, - "literal-string": { - "name": "string.quoted.double.swift", - "begin": "\"", - "end": "\"", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.swift" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.swift" - } - }, - "patterns": [ - { - "include": "#quoted-text" - } - ] - }, - "literal-boolean": { - "match": "\\b(true|false)\\b(?![?!])", - "name": "constant.language.boolean.swift" - }, - "operator": { - "patterns": [ - { - "include": "#operator-character" - } - ] - }, - "operator-character": { - "name": "keyword.operator.swift", - "match": "[\\/=\\-+!*%<>&|^~.]" - }, - "quoted-text": { - "patterns": [ - { - "name": "meta.embedded.line.swift", - "contentName": "source.swift", - "begin": "\\\\\\(", - "end": "\\)", - "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.swift" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.section.embedded.end.swift" - } - }, - "patterns": [ - { - "include": "$self" - } - ] - }, - { - "include": "#escaped-char" - } - ] - }, - "function": { - "name": "meta.function.swift", - "begin": "(func) \\s*", - "end": "(?=\\{|#)|;|$", - "beginCaptures": { - "1": { - "name": "storage.type.function.swift" - } - }, - "comment": "match regular function like: func myFunc(...)", - "patterns": [ - { - "begin": "([a-zA-Z_0-9]+)\\s*(\\()", - "beginCaptures": { - "1": { - "name": "entity.name.function.swift" - }, - "2": { - "name": "punctuation.definition.parameters.begin.swift" - } - }, - "comment": "match regular function like: func myFunc(...)", - "end": "(\\))", - "endCaptures": { - "1": { - "name": "punctuation.definition.parameters.end.swift" - } - } - }, - { - "name": "meta.return-type.swift", - "match": "((->)\\s*([^\\{]+))", - "captures": { - "2": { - "name": "punctuation.function.swift" - }, - "3": { - "name": "entity.name.type.class.swift" - } - } - } - ] - }, - "whitespace": { - "match": "(?x) [ \\u0020 (?# space) \\u000A (?# line-feed) \\u000D (?# carriage-return) \\u0009 (?# horizontal-tab) \\u000B (?# vertical-tab) \\u000C (?# form-feed) \\u0000 (?# null) ]" - }, - "attribute": { - "name": "storage.type.attribute.swift", - "begin": "@", - "end": " " - } - } -} \ No newline at end of file diff --git a/extensions/swift/syntaxes/swift.tmLanguage.json b/extensions/swift/syntaxes/swift.tmLanguage.json new file mode 100644 index 00000000000..87fa5be1e75 --- /dev/null +++ b/extensions/swift/syntaxes/swift.tmLanguage.json @@ -0,0 +1,217 @@ +{ + "scopeName": "source.swift", + "fileTypes": [ + "swift" + ], + "name": "Swift", + "firstLineMatch": "^#!\\s*/.*\\bswift", + "patterns": [ + { + "name": "keyword.others.swift", + "match": "^\\s*(#if|#else|#endif|#elseif|@warn_unused_result|@discardableResult|@IBAction|@IBOutlet|@IBDesignable|@IBInspectable)\\b" + }, + { + "name": "keyword.declaration.swift", + "match": "\\b(deinit|import|init|subscript)\\b" + }, + { + "name": "storage.type.swift", + "match": "\\b(precedencegroup|class|struct|enum|extension|protocol|let|var|typealias)\\b" + }, + { + "name": "storage.modifier.swift", + "match": "\\b(final|internal|private|fileprivate|public|open|static|required|convenience)\\b" + }, + { + "name": "keyword.statement.swift", + "match": "\\b(try|catch|repeat|break|case|continue|default|do|else|fallthrough|if|in|for|return|switch|where|while|guard|defer)\\b" + }, + { + "name": "support.type.swift", + "match": "(?x) \\b(Character|U?Int|U?Int(8|16|32|64) |Float|Double|Float(32|64)|Bool|String|Date|Data|URL |(double|float)[234]|(double|float)[234]x[234] |Any |AnyObject |Error |Equatable |Hashable |Comparable |CustomDebugStringConvertible |CustomStringConvertible |OptionSet |ManagedBuffer |ManagedBufferPointer |BitwiseOperations |CountedSet |Counter |Directions |ExpressibleByArrayLiteral |ExpressibleByBooleanLiteral |ExpressibleByDictionaryLiteral |ExpressibleByExtendedGraphemeClusterLiteral |ExpressibleByFloatLitera |ExpressibleByIntegerLiteral |ExpressibleByNilLiteral |ExpressibleByStringInterpolation |ExpressibleByStringLiteral |ExpressibleByUnicodeScalarLiteral |OrderedSet |PaperSize |RawRepresentable |(UI|NS|CF|CG)[A-Z][a-zA-Z0-9]+ |Stream |(In|Out)putStream |FileManager |Array |Unsafe[a-zA-Z]*Pointer |Bundle |Jex)\\b" + }, + { + "name": "support.function.swift", + "match": "\\b(assert|assertionFailure|print)\\b" + }, + { + "name": "keyword.expressions-and-types.swift", + "match": "\\b(as|dynamicType|is|new|super|self|Self|Type|#column|#file|#function|#line)\\b" + }, + { + "name": "keyword.reserved.swift", + "match": "\\b(associativity|didSet|get|infix|inout|left|mutating|nonmutating|operator|override|postfix|precedence|prefix|right|set|unowned|unowned(safe)|unowned(unsafe)|weak|willSet)\\b" + }, + { + "name": "constant.language.swift", + "match": "\\b(true|false|nil|none)\\b" + }, + { + "name": "entity.name.function.swift", + "match": "\\bfunc\\s+([^\\t\\n\\x20\\x28]+)" + }, + { + "include": "#comment" + }, + { + "include": "#literal" + }, + { + "include": "#operator" + } + ], + "repository": { + "comment": { + "patterns": [ + { + "name": "comment.block.swift", + "begin": "/\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.swift" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.swift" + } + }, + "patterns": [ + { + "include": "#comment" + } + ] + }, + { + "begin": "(^[ \\t]+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.swift" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "name": "comment.line.double-slash.swift", + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.swift" + } + }, + "end": "\\n", + "patterns": [ + { + "name": "punctuation.separator.continuation.swift", + "match": "(?>\\\\\\s*\\n)" + } + ] + } + ] + } + ] + }, + "escaped-char": { + "patterns": [ + { + "name": "constant.character.escape.swift", + "match": "\\\\[0\\\\tnr\"']" + }, + { + "name": "constant.character.escape.swift", + "match": "\\\\(x\\h{2}|u\\h{4}|U\\h{8})" + }, + { + "name": "invalid.illegal.constant.character.escape.swift", + "match": "\\\\[^uxU]" + } + ] + }, + "identifier": { + "match": "(?x) (? \\g \\g? | ` \\g \\g? ` ){0} (? [ a-z A-Z ] | [ \\u00A8 \\u00AA \\u00AD \\u00AF \\u00B2-\\u00B5 \\u00B7-\\u00BA ] | [ \\u00BC-\\u00BE \\u00C0-\\u00D6 \\u00D8-\\u00F6 \\u00F8-\\u00FF ] | [ \\u0100-\\u02FF \\u0370-\\u167F \\u1681-\\u180D \\u180F-\\u1DBF ] | [ \\u1E00-\\u1FFF ] | [ \\u200B-\\u200D \\u202A-\\u202E \\u203F-\\u2040 \\u2054 \\u2060-\\u206F ] | [ \\u2070-\\u20CF \\u2100-\\u218F \\u2460-\\u24FF \\u2776-\\u2793 ] | [ \\u2C00-\\u2DFF \\u2E80-\\u2FFF ] | [ \\u3004-\\u3007 \\u3021-\\u302F \\u3031-\\u303F \\u3040-\\uD7FF ] | [ \\uF900-\\uFD3D \\uFD40-\\uFDCF \\uFDF0-\\uFE1F \\uFE30-\\uFE44 ] | [ \\uFE47-\\uFFFD ] | [ \\u10000-\\u1FFFD \\u20000-\\u2FFFD \\u30000-\\u3FFFD \\u40000-\\u4FFFD ] | [ \\u50000-\\u5FFFD \\u60000-\\u6FFFD \\u70000-\\u7FFFD \\u80000-\\u8FFFD ] | [ \\u90000-\\u9FFFD \\uA0000-\\uAFFFD \\uB0000-\\uBFFFD \\uC0000-\\uCFFFD ] | [ \\uD0000-\\uDFFFD \\uE0000-\\uEFFFD ] ){0} (? \\d | [ \\u0300-\\u036F \\u1DC0-\\u1DFF \\u20D0-\\u20FF \\uFE20-\\uFE2F ] | \\g ){0} (? \\g \\g? ){0} (? (?) \\$ \\d+ (?!\\g) (?# FIXME) ){0} \\g | \\g", + "captures": { + "5": { + "name": "variable.other.positional.swift" + } + } + }, + "literal": { + "patterns": [ + { + "include": "#literal-number" + }, + { + "include": "#literal-string" + } + ] + }, + "literal-number": { + "name": "constant.numeric.swift", + "match": "(?x) (?### INTEGER ###) (? \\g | \\g | \\g | \\g ){0} (?### BINARY ###) (? \\b 0b \\g \\g? \\b ){0} (? [0-1] ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### OCTAL ###) (? \\b 0o \\g \\g? \\b ){0} (? [0-7] ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### DECIMAL ###) (? \\b \\g \\g? \\b ){0} (? \\d ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### HEXADECIMAL ###) (? \\b 0x \\g \\g? \\b ){0} (? \\h ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### FLOATING POINT ###) (? \\b \\g \\g? \\g? \\b | \\b \\g \\g? \\g \\b ){0} (? \\. \\g ){0} (? \\g \\g? \\g ){0} (? \\. \\g? ){0} (? \\g \\g? \\g ){0} (? [eE] ){0} (? [pP] ){0} (? [+-] ){0} (?!0[box]) \\g | \\g" + }, + "literal-string": { + "name": "string.quoted.double.swift", + "begin": "\"", + "end": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.swift" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.swift" + } + }, + "patterns": [ + { + "include": "#quoted-text" + } + ] + }, + "operator": { + "patterns": [ + { + "include": "#operator-character" + } + ] + }, + "operator-character": { + "name": "keyword.operator.swift", + "match": "[\\/=\\-+!*%<>&|^~,\\?:\\[\\]]" + }, + "quoted-text": { + "patterns": [ + { + "name": "meta.embedded.line.swift", + "contentName": "source.swift", + "begin": "\\\\\\(", + "end": "\\)", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.swift" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.swift" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "#escaped-char" + } + ] + }, + "whitespace": { + "match": "(?x) [ \\u0020 (?# space) \\u000A (?# line-feed) \\u000D (?# carriage-return) \\u0009 (?# horizontal-tab) \\u000B (?# vertical-tab) \\u000C (?# form-feed) \\u0000 (?# null) ]" + } + }, + "version": "https://github.com/freebroccolo/atom-language-swift/commit/fb7c93e0174dea69c8685c00deeb53d480d1d202" +} \ No newline at end of file diff --git a/extensions/swift/test/colorize-results/test_swift.json b/extensions/swift/test/colorize-results/test_swift.json index f421ae1fba8..cf3e2493522 100644 --- a/extensions/swift/test/colorize-results/test_swift.json +++ b/extensions/swift/test/colorize-results/test_swift.json @@ -1,13 +1,13 @@ [ { "c": "var", - "t": "source.swift keyword.declaration.swift", + "t": "source.swift storage.type.swift", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "storage.type: #569CD6", + "light_plus": "storage.type: #0000FF", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type: #569CD6" } }, { @@ -56,13 +56,13 @@ }, { "c": "var", - "t": "source.swift keyword.declaration.swift", + "t": "source.swift storage.type.swift", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "storage.type: #569CD6", + "light_plus": "storage.type: #0000FF", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type: #569CD6" } }, { @@ -132,30 +132,8 @@ } }, { - "c": "func", - "t": "source.swift meta.function.swift storage.type.function.swift", - "r": { - "dark_plus": "storage.type: #569CD6", - "light_plus": "storage.type: #0000FF", - "dark_vs": "storage.type: #569CD6", - "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" - } - }, - { - "c": " ", - "t": "source.swift meta.function.swift", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "hasAnyMatches", - "t": "source.swift meta.function.swift entity.name.function.swift", + "c": "func hasAnyMatches", + "t": "source.swift entity.name.function.swift", "r": { "dark_plus": "entity.name.function: #DCDCAA", "light_plus": "entity.name.function: #795E26", @@ -165,8 +143,8 @@ } }, { - "c": "(", - "t": "source.swift meta.function.swift punctuation.definition.parameters.begin.swift", + "c": "(list", + "t": "source.swift", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -176,30 +154,107 @@ } }, { - "c": "list: [Int], condition: (Int", - "t": "source.swift meta.function.swift", + "c": ":", + "t": "source.swift keyword.operator.swift", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": ")", - "t": "source.swift meta.function.swift punctuation.definition.parameters.end.swift", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" } }, { "c": " ", - "t": "source.swift meta.function.swift", + "t": "source.swift", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "[", + "t": "source.swift keyword.operator.swift", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": "Int", + "t": "source.swift support.type.swift", + "r": { + "dark_plus": "support.type: #4EC9B0", + "light_plus": "support.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.type: #4EC9B0" + } + }, + { + "c": "],", + "t": "source.swift keyword.operator.swift", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " condition", + "t": "source.swift", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ":", + "t": "source.swift keyword.operator.swift", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " (", + "t": "source.swift", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "Int", + "t": "source.swift support.type.swift", + "r": { + "dark_plus": "support.type: #4EC9B0", + "light_plus": "support.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.type: #4EC9B0" + } + }, + { + "c": ") ", + "t": "source.swift", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -210,39 +265,83 @@ }, { "c": "->", - "t": "source.swift meta.function.swift meta.return-type.swift punctuation.function.swift", + "t": "source.swift keyword.operator.swift", "r": { - "dark_plus": "meta.return-type: #4EC9B0", - "light_plus": "meta.return-type: #267F99", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "meta.return-type: #4EC9B0" + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" } }, { "c": " ", - "t": "source.swift meta.function.swift meta.return-type.swift", + "t": "source.swift", "r": { - "dark_plus": "meta.return-type: #4EC9B0", - "light_plus": "meta.return-type: #267F99", + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "meta.return-type: #4EC9B0" + "hc_black": "default: #FFFFFF" } }, { - "c": "Bool) -> Bool ", - "t": "source.swift meta.function.swift meta.return-type.swift entity.name.type.class.swift", + "c": "Bool", + "t": "source.swift support.type.swift", "r": { - "dark_plus": "entity.name.type: #4EC9B0", - "light_plus": "entity.name.type: #267F99", + "dark_plus": "support.type: #4EC9B0", + "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "entity.name.type: #4EC9B0" + "hc_black": "support.type: #4EC9B0" } }, { - "c": "{", + "c": ") ", + "t": "source.swift", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "->", + "t": "source.swift keyword.operator.swift", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " ", + "t": "source.swift", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "Bool", + "t": "source.swift support.type.swift", + "r": { + "dark_plus": "support.type: #4EC9B0", + "light_plus": "support.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.type: #4EC9B0" + } + }, + { + "c": " {", "t": "source.swift", "r": { "dark_plus": "default: #D4D4D4", @@ -375,13 +474,13 @@ }, { "c": "true", - "t": "source.swift keyword.expressions-and-types.swift", + "t": "source.swift constant.language.swift", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "constant.language: #569CD6", + "light_plus": "constant.language: #0000FF", + "dark_vs": "constant.language: #569CD6", + "light_vs": "constant.language: #0000FF", + "hc_black": "constant.language: #569CD6" } }, { @@ -441,13 +540,13 @@ }, { "c": "false", - "t": "source.swift keyword.expressions-and-types.swift", + "t": "source.swift constant.language.swift", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "constant.language: #569CD6", + "light_plus": "constant.language: #0000FF", + "dark_vs": "constant.language: #569CD6", + "light_vs": "constant.language: #0000FF", + "hc_black": "constant.language: #569CD6" } }, {