From f8f7242417f439278b66c695c9868d493650f85c Mon Sep 17 00:00:00 2001 From: Philipp Leo Dylong Date: Thu, 5 May 2016 11:21:18 +0200 Subject: [PATCH] added Attributes case -added Attributes case highlight words beginning with a @ sing -made some lines more compact for readability --- swift.nanorc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/swift.nanorc b/swift.nanorc index 7204e04..ab56c6f 100644 --- a/swift.nanorc +++ b/swift.nanorc @@ -1,5 +1,5 @@ ############################################################################## -# Swift syntax highlighting for Nano. v.1.04 +# Swift syntax highlighting for Nano. v.1.1 ############################################################################## syntax "Swift" "\.swift$" @@ -12,24 +12,30 @@ color yellow "[.:;,+*|=!?\%]" "<" ">" "/" "-" "&" color brightyellow "[!]" # Statements -color magenta "\<(class|import|let|var|struct|enum|func|if|else|switch|case|default|for|in|internal|external|unowned|static|private|public|throws)\>" -color magenta "\<(prefix|postfix|operator|extension|lazy|get|set|self|willSet|didSet|override|super|convenience|weak|strong|mutating|return|guard)\>" +color magenta "\<(class|import|let|var|struct|enum|func|if|else|switch|case|default|for|in|static|private|public|throws)\>" +color magenta "\<(lazy|get|set|self|willSet|didSet|override|super|convenience|weak|strong|mutating|return|guard)\>" +color magenta "\<(protocol|typealias|prefix|postfix|operator|extension|internal|external|unowned)\>" # Keywords color cyan "\<(print)\>" color magenta "\<(init)\>" +# Attribute +color red "(@+[a-zA-Z]+)" + # Numbers color blue "\<([0-9]+)\>" # Standard Types color brightmagenta "\<((U)?Int(8|16|32|64))\>" color brightmagenta "\<(true|false|nil)\>" -color brightmagenta "\<(Double|String|Float|Bool|Dictionary|Array|Int|UInt|Character|Range|Set|UnicodeScalar|Bit|RawByte|Slice|UnsafePointer|UnsafeMutablePointer)\>" +color brightmagenta "\<(UInt|Int|Double|String|Float|Bool|Dictionary|Array|Character|Range|Set|Bit|RawByte|Slice)\>" +color brightmagenta "\<(UnicodeScalar|UnsafePointer|UnsafeMutablePointer)\>" color magenta "\<(AnyObject)\>" # Standard Type Aliases and Protocols -color magenta "\<(AnyObject|AnyClass|GeneratorType|AnyGenerator|Element|Optional|Mirror|UnicodeScalarType|IntMax|UIntMax|Void|Any|Comparable|Equatable|Hashable|SequenceType)\>" +color magenta "\<(AnyObject|AnyClass|GeneratorType|AnyGenerator|Element|Optional|Mirror)\>" +color magenta "\<(UnicodeScalarType|IntMax|UIntMax|Void|Any|Comparable|Equatable|Hashable|SequenceType)\>" # Standard Libraries color cyan "\<(Foundation|Glibc|Darwin|XCTest)\>"