mirror of
https://github.com/scopatz/nanorc
synced 2024-11-27 12:25:53 +01:00
- added Standard Libraries
- fixed and improved some Standard Types - made ! more visible
This commit is contained in:
parent
e7974027ca
commit
5536991f40
30
swift.nanorc
30
swift.nanorc
|
@ -1,5 +1,5 @@
|
|||
##############################################################################
|
||||
# Swift syntax highlighting for Nano.
|
||||
# Swift syntax highlighting for Nano. v.1.04
|
||||
##############################################################################
|
||||
|
||||
syntax "Swift" "\.swift$"
|
||||
|
@ -9,27 +9,37 @@ color white ".+"
|
|||
|
||||
# Operators
|
||||
color yellow "[.:;,+*|=!?\%]" "<" ">" "/" "-" "&"
|
||||
color brightyellow "[!]"
|
||||
|
||||
# Statements
|
||||
color magenta "(class|import|let|var|struct|enum|func|if|else|switch|case|default|for|in|internal|external|unowned|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 "\b(class|import|let|var|struct|enum|func|if|else|switch|case|default|for|in|internal|external|unowned|private|public|throws)\b"
|
||||
color magenta "\b(prefix|postfix|operator|extension|lazy|get|set|self|willSet|didSet|override|super|convenience|weak|strong|mutating|return|guard)\b"
|
||||
|
||||
# Keywords
|
||||
color cyan "(print)"
|
||||
color magenta "(init)"
|
||||
color cyan "\b(print)\b"
|
||||
color magenta "\b(init)\b"
|
||||
|
||||
# Numbers
|
||||
color blue "([0-9]+)"
|
||||
color blue "\b([0-9]+)\b"
|
||||
|
||||
# Standard Types
|
||||
color brightmagenta "\ ((U)?Int(8|16|32|64))"
|
||||
color brightmagenta "(true|false|nil)"
|
||||
color brightmagenta "\ (Double|String|Float|Boolean|Dictionary|Array|Int)"
|
||||
color magenta "\ (AnyObject)"
|
||||
color brightmagenta "\b((U)?Int(8|16|32|64))\b"
|
||||
color brightmagenta "\b(true|false|nil)\b"
|
||||
color brightmagenta "\b(Double|String|Float|Bool|Dictionary|Array|Int|UInt|Character|Range|Set|UnicodeScalar|Bit|RawByte|Slice|UnsafePointer|UnsafeMutablePointer)\b"
|
||||
color magenta "\b(AnyObject)\b"
|
||||
|
||||
# Standard Type Aliases and Protocols
|
||||
color magenta "\b(AnyObject|AnyClass|GeneratorType|AnyGenerator|Element|Optional|Mirror|UnicodeScalarType|IntMax|UIntMax|Void|Any|Comparable|Equatable|Hashable|SequenceType)\b"
|
||||
|
||||
# Standard Libraries
|
||||
color cyan "\b(Foundation|Glibc|Darwin|XCTest|)\b"
|
||||
|
||||
# Text
|
||||
color red ""[^"]*""
|
||||
|
||||
# Variable in Text
|
||||
color white start="\\\(" end="\)"
|
||||
|
||||
# Comments
|
||||
color green "//.*"
|
||||
color brightgreen "///.*"
|
||||
|
|
Loading…
Reference in New Issue
Block a user