1
0
mirror of https://github.com/scopatz/nanorc synced 2024-11-22 08:35:39 +01:00

added Attributes case

-added Attributes case highlight words beginning with a @ sing
-made some lines more compact for readability
This commit is contained in:
Philipp Leo Dylong 2016-05-05 11:21:18 +02:00
parent 8afb5e604d
commit f8f7242417

View File

@ -1,5 +1,5 @@
############################################################################## ##############################################################################
# Swift syntax highlighting for Nano. v.1.04 # Swift syntax highlighting for Nano. v.1.1
############################################################################## ##############################################################################
syntax "Swift" "\.swift$" syntax "Swift" "\.swift$"
@ -12,24 +12,30 @@ color yellow "[.:;,+*|=!?\%]" "<" ">" "/" "-" "&"
color brightyellow "[!]" color brightyellow "[!]"
# Statements # 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 "\<(class|import|let|var|struct|enum|func|if|else|switch|case|default|for|in|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 "\<(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 # Keywords
color cyan "\<(print)\>" color cyan "\<(print)\>"
color magenta "\<(init)\>" color magenta "\<(init)\>"
# Attribute
color red "(@+[a-zA-Z]+)"
# Numbers # Numbers
color blue "\<([0-9]+)\>" color blue "\<([0-9]+)\>"
# Standard Types # Standard Types
color brightmagenta "\<((U)?Int(8|16|32|64))\>" color brightmagenta "\<((U)?Int(8|16|32|64))\>"
color brightmagenta "\<(true|false|nil)\>" 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)\>" color magenta "\<(AnyObject)\>"
# Standard Type Aliases and Protocols # 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 # Standard Libraries
color cyan "\<(Foundation|Glibc|Darwin|XCTest)\>" color cyan "\<(Foundation|Glibc|Darwin|XCTest)\>"