mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Update "Swift" syntax style
This commit is contained in:
parent
1004aac163
commit
1f150d1cb1
@ -14,6 +14,8 @@ develop
|
||||
|
||||
- Improve saving error dialog to display more detailed error reason.
|
||||
- Avoid beeping on typing single `>` even if `<>` brace highlighting turned on.
|
||||
- Update “Swift” syntax style:
|
||||
- Add new terms available in Swift 2.0.
|
||||
|
||||
|
||||
### Fixes
|
||||
|
@ -28,24 +28,35 @@ outlineMenu:
|
||||
completions: []
|
||||
attributes:
|
||||
- beginString: "@autoclosure"
|
||||
- beginString: "@available"
|
||||
- beginString: "@exported"
|
||||
- beginString: "@IBAction"
|
||||
- beginString: "@IBDesignable"
|
||||
- beginString: "@IBInspectable"
|
||||
- beginString: "@IBOutlet"
|
||||
- beginString: "@inline"
|
||||
- beginString: "@noescape"
|
||||
- beginString: "@nonobjc"
|
||||
- beginString: "@noreturn"
|
||||
- beginString: "@NSApplicationMain"
|
||||
- beginString: "@NSCopying"
|
||||
- beginString: "@NSManaged"
|
||||
- beginString: "@objc"
|
||||
- beginString: "@objc_non_lazy_realization"
|
||||
- beginString: "@optional"
|
||||
- beginString: "@required"
|
||||
- beginString: "@requires_stored_property_inits"
|
||||
- beginString: "@testable"
|
||||
- beginString: "@UIApplicationMain"
|
||||
- beginString: "@warn_unqualified_access"
|
||||
- beginString: "@warn_unused_result"
|
||||
metadata:
|
||||
author: "1024jp"
|
||||
distributionURL: "http://coteditor.com"
|
||||
version: "1.1"
|
||||
description: "Based on Swift beta5."
|
||||
version: "2.0"
|
||||
description: "Based on Swift 2.0."
|
||||
license: "Same as CotEditor"
|
||||
lastModified: "2014-09-24"
|
||||
lastModified: "2015-09-23"
|
||||
characters:
|
||||
- beginString: "'"
|
||||
endString: "'"
|
||||
@ -56,41 +67,196 @@ values:
|
||||
- beginString: "false"
|
||||
- beginString: "nil"
|
||||
- beginString: "true"
|
||||
commands:
|
||||
- beginString: "abs"
|
||||
- beginString: "alignof"
|
||||
- beginString: "alignofValue"
|
||||
- beginString: "anyGenerator"
|
||||
- beginString: "assert"
|
||||
- beginString: "assertionFailure"
|
||||
- beginString: "debugPrint"
|
||||
- beginString: "dump"
|
||||
- beginString: "fatalError"
|
||||
- beginString: "getVaList"
|
||||
- beginString: "isUniquelyReferenced"
|
||||
- beginString: "isUniquelyReferencedNonObjC"
|
||||
- beginString: "max"
|
||||
- beginString: "min"
|
||||
- beginString: "numericCast"
|
||||
- beginString: "precondition"
|
||||
- beginString: "preconditionFailure"
|
||||
- beginString: "print"
|
||||
- beginString: "readLine"
|
||||
- beginString: "sizeof"
|
||||
- beginString: "sizeofValue"
|
||||
- beginString: "strideof"
|
||||
- beginString: "strideofValue"
|
||||
- beginString: "swap"
|
||||
- beginString: "transcode"
|
||||
- beginString: "unsafeAddressOf"
|
||||
- beginString: "unsafeBitCast"
|
||||
- beginString: "unsafeDowncast"
|
||||
- beginString: "unsafeUnwrap"
|
||||
- beginString: "withExtendedLifetime"
|
||||
- beginString: "withUnsafeMutablePointer"
|
||||
- beginString: "withUnsafeMutablePointers"
|
||||
- beginString: "withUnsafePointer"
|
||||
- beginString: "withUnsafePointers"
|
||||
- beginString: "withVaList"
|
||||
- beginString: "zip"
|
||||
types:
|
||||
- beginString: "Any"
|
||||
- beginString: "AnyBidirectionalCollection"
|
||||
- beginString: "AnyBidirectionalIndex"
|
||||
- beginString: "AnyClass"
|
||||
- beginString: "AnyForwardCollection"
|
||||
- beginString: "AnyForwardIndex"
|
||||
- beginString: "AnyGenerator"
|
||||
- beginString: "AnyObject"
|
||||
- beginString: "AnyRandomAccessCollection"
|
||||
- beginString: "AnyRandomAccessIndex"
|
||||
- beginString: "AnySequence"
|
||||
- beginString: "Array"
|
||||
- beginString: "ArraySlice"
|
||||
- beginString: "AutoreleasingUnsafeMutablePointer"
|
||||
- beginString: "Bit"
|
||||
- beginString: "Bool"
|
||||
- beginString: "Boolean"
|
||||
- beginString: "BooleanLiteralType"
|
||||
- beginString: "CBool"
|
||||
- beginString: "CChar"
|
||||
- beginString: "CChar16"
|
||||
- beginString: "CChar32"
|
||||
- beginString: "CDouble"
|
||||
- beginString: "CFloat"
|
||||
- beginString: "Character"
|
||||
- beginString: "CInt"
|
||||
- beginString: "CLong"
|
||||
- beginString: "CLongLong"
|
||||
- beginString: "COpaquePointer"
|
||||
- beginString: "CShort"
|
||||
- beginString: "CSignedChar"
|
||||
- beginString: "CUnsignedChar"
|
||||
- beginString: "CUnsignedInt"
|
||||
- beginString: "CUnsignedLong"
|
||||
- beginString: "CUnsignedLongLong"
|
||||
- beginString: "CUnsignedShort"
|
||||
- beginString: "CVaListPointer"
|
||||
- beginString: "CWideChar"
|
||||
- beginString: "Character"
|
||||
- beginString: "ClosedInterval"
|
||||
- beginString: "CollectionOfOne"
|
||||
- beginString: "ContiguousArray"
|
||||
- beginString: "Dictionary"
|
||||
- beginString: "DictionaryGenerator"
|
||||
- beginString: "DictionaryIndex"
|
||||
- beginString: "DictionaryLiteral"
|
||||
- beginString: "Double"
|
||||
- beginString: "EmptyCollection"
|
||||
- beginString: "EmptyGenerator"
|
||||
- beginString: "EnumerateGenerator"
|
||||
- beginString: "EnumerateSequence"
|
||||
- beginString: "ExtendedGraphemeClusterType"
|
||||
- beginString: "FlattenBidirectionalCollection"
|
||||
- beginString: "FlattenBidirectionalCollectionIndex"
|
||||
- beginString: "FlattenCollection"
|
||||
- beginString: "FlattenCollectionIndex"
|
||||
- beginString: "FlattenGenerator"
|
||||
- beginString: "FlattenSequence"
|
||||
- beginString: "Float"
|
||||
- beginString: "Float32"
|
||||
- beginString: "Float64"
|
||||
- beginString: "Float80"
|
||||
- beginString: "FloatLiteralType"
|
||||
- beginString: "FloatingPointClassification"
|
||||
- beginString: "GeneratorOfOne"
|
||||
- beginString: "GeneratorSequence"
|
||||
- beginString: "HalfOpenInterval"
|
||||
- beginString: "ImplicitlyUnwrappedOptional"
|
||||
- beginString: "IndexingGenerator"
|
||||
- beginString: "Int"
|
||||
- beginString: "Int16"
|
||||
- beginString: "Int32"
|
||||
- beginString: "Int64"
|
||||
- beginString: "Int8"
|
||||
- beginString: "IntMax"
|
||||
- beginString: "IntegerLiteralType"
|
||||
- beginString: "JoinGenerator"
|
||||
- beginString: "JoinSequence"
|
||||
- beginString: "LazyCollection"
|
||||
- beginString: "LazyFilterCollection"
|
||||
- beginString: "LazyFilterGenerator"
|
||||
- beginString: "LazyFilterIndex"
|
||||
- beginString: "LazyFilterSequence"
|
||||
- beginString: "LazyMapCollection"
|
||||
- beginString: "LazyMapGenerator"
|
||||
- beginString: "LazyMapSequence"
|
||||
- beginString: "LazySequence"
|
||||
- beginString: "ManagedBuffer"
|
||||
- beginString: "ManagedBufferPointer"
|
||||
- beginString: "ManagedProtoBuffer"
|
||||
- beginString: "Mirror"
|
||||
- beginString: "Mirror.AncestorRepresentation"
|
||||
- beginString: "Mirror.DisplayStyle"
|
||||
- beginString: "MutableSlice"
|
||||
- beginString: "NonObjectiveCBase"
|
||||
- beginString: "NSErrorPointer"
|
||||
- beginString: "ObjCBool"
|
||||
- beginString: "ObjectIdentifier"
|
||||
- beginString: "Optional"
|
||||
- beginString: "PermutationGenerator"
|
||||
- beginString: "PlaygroundQuickLook"
|
||||
- beginString: "Process"
|
||||
- beginString: "Range"
|
||||
- beginString: "RangeGenerator"
|
||||
- beginString: "RawByte"
|
||||
- beginString: "Repeat"
|
||||
- beginString: "ReverseCollection"
|
||||
- beginString: "ReverseIndex"
|
||||
- beginString: "ReverseRandomAccessCollection"
|
||||
- beginString: "ReverseRandomAccessIndex"
|
||||
- beginString: "Set"
|
||||
- beginString: "SetGenerator"
|
||||
- beginString: "SetIndex"
|
||||
- beginString: "Slice"
|
||||
- beginString: "StaticString"
|
||||
- beginString: "StrideThrough"
|
||||
- beginString: "StrideThroughGenerator"
|
||||
- beginString: "StrideTo"
|
||||
- beginString: "StrideToGenerator"
|
||||
- beginString: "String"
|
||||
- beginString: "String.CharacterView"
|
||||
- beginString: "String.CharacterView.Index"
|
||||
- beginString: "String.UTF16View"
|
||||
- beginString: "String.UTF16View.Index"
|
||||
- beginString: "String.UTF8View"
|
||||
- beginString: "String.UTF8View.Index"
|
||||
- beginString: "String.UnicodeScalarView"
|
||||
- beginString: "String.UnicodeScalarView.Generator"
|
||||
- beginString: "String.UnicodeScalarView.Index"
|
||||
- beginString: "StringLiteralType"
|
||||
- beginString: "UInt"
|
||||
- beginString: "UInt16"
|
||||
- beginString: "UInt32"
|
||||
- beginString: "UInt64"
|
||||
- beginString: "UInt8"
|
||||
- beginString: "UIntMax"
|
||||
- beginString: "UTF16"
|
||||
- beginString: "UTF32"
|
||||
- beginString: "UTF8"
|
||||
- beginString: "UnicodeDecodingResult"
|
||||
- beginString: "UnicodeScalar"
|
||||
- beginString: "UnicodeScalar.UTF16View"
|
||||
- beginString: "UnicodeScalarType"
|
||||
- beginString: "Unmanaged"
|
||||
- beginString: "UnsafeBufferPointer"
|
||||
- beginString: "UnsafeBufferPointerGenerator"
|
||||
- beginString: "UnsafeMutableBufferPointer"
|
||||
- beginString: "UnsafeMutablePointer"
|
||||
- beginString: "UnsafePointer"
|
||||
- beginString: "VaListBuilder"
|
||||
- beginString: "Void"
|
||||
- beginString: "Zip2Generator"
|
||||
- beginString: "Zip2Sequence"
|
||||
numbers:
|
||||
- beginString: "(?<![0-9a-z_])[-+]?([0-9][0-9._]*|\\.[0-9][0-9_]*)(e-?[0-9._]+)?\\b"
|
||||
ignoreCase: true
|
||||
@ -110,18 +276,28 @@ keywords:
|
||||
- beginString: "__FILE__"
|
||||
- beginString: "__FUNCTION__"
|
||||
- beginString: "__LINE__"
|
||||
- beginString: "#available"
|
||||
- beginString: "#else"
|
||||
- beginString: "#elseif"
|
||||
- beginString: "#endif"
|
||||
- beginString: "#if"
|
||||
- beginString: "#line"
|
||||
- beginString: "as"
|
||||
- beginString: "associativity"
|
||||
- beginString: "break"
|
||||
- beginString: "case"
|
||||
- beginString: "catch"
|
||||
- beginString: "class"
|
||||
- beginString: "continue"
|
||||
- beginString: "convenience"
|
||||
- beginString: "default"
|
||||
- beginString: "defer"
|
||||
- beginString: "deinit"
|
||||
- beginString: "didSet"
|
||||
- beginString: "do"
|
||||
- beginString: "dynamic"
|
||||
- beginString: "dynamicType"
|
||||
- beginString: "else"
|
||||
- beginString: "enum"
|
||||
- beginString: "extension"
|
||||
- beginString: "fallthrough"
|
||||
@ -129,9 +305,11 @@ keywords:
|
||||
- beginString: "for"
|
||||
- beginString: "func"
|
||||
- beginString: "get"
|
||||
- beginString: "guard"
|
||||
- beginString: "if"
|
||||
- beginString: "import"
|
||||
- beginString: "in"
|
||||
- beginString: "indirect"
|
||||
- beginString: "infix"
|
||||
- beginString: "init"
|
||||
- beginString: "inout"
|
||||
@ -144,7 +322,9 @@ keywords:
|
||||
- beginString: "new"
|
||||
- beginString: "none"
|
||||
- beginString: "nonmutating"
|
||||
- beginString: "objc"
|
||||
- beginString: "operator"
|
||||
- beginString: "optional"
|
||||
- beginString: "override"
|
||||
- beginString: "postfix"
|
||||
- beginString: "precedence"
|
||||
@ -152,17 +332,24 @@ keywords:
|
||||
- beginString: "private"
|
||||
- beginString: "protocol"
|
||||
- beginString: "public"
|
||||
- beginString: "required"
|
||||
- beginString: "rethrows"
|
||||
- beginString: "return"
|
||||
- beginString: "right"
|
||||
- beginString: "safe"
|
||||
- beginString: "Self"
|
||||
- beginString: "set"
|
||||
- beginString: "static"
|
||||
- beginString: "struct"
|
||||
- beginString: "subscript"
|
||||
- beginString: "switch"
|
||||
- beginString: "throw"
|
||||
- beginString: "throws"
|
||||
- beginString: "try"
|
||||
- beginString: "Type"
|
||||
- beginString: "typealias"
|
||||
- beginString: "unowned"
|
||||
- beginString: "unsafe"
|
||||
- beginString: "var"
|
||||
- beginString: "weak"
|
||||
- beginString: "where"
|
||||
@ -172,6 +359,7 @@ variables:
|
||||
- beginString: "$\\d\\b"
|
||||
regularExpression: true
|
||||
- beginString: "newValue"
|
||||
- beginString: "oldValue"
|
||||
- beginString: "self"
|
||||
- beginString: "super"
|
||||
commentDelimiters:
|
||||
|
Loading…
Reference in New Issue
Block a user