]> git.lizzy.rs Git - micro.git/blob - syntax_files/swift.micro
Proper window resize handling
[micro.git] / syntax_files / swift.micro
1 ##############################################################################
2 # Swift syntax highlighting for Nano.
3 ##############################################################################
4
5 syntax "Swift" "\.swift$"
6
7 # Operators
8 color statement "[.:;,+*|=!?\%]" "<" ">" "/" "-" "&"
9
10 # Statements
11 color statement  "(class|import|let|var|struct|enum|func|if|else|switch|case|default|for|in|internal|external|unowned|private|public|throws)\ "
12 color statement  "(prefix|postfix|operator|extension|lazy|get|set|self|willSet|didSet|override|super|convenience|weak|strong|mutating|return|guard)\ "
13
14 # Keywords
15 color statement "(print)"
16 color statement "(init)"
17
18 # Numbers
19 color constant "([0-9]+)"
20
21 # Standard Types
22 color type "\ ((U)?Int(8|16|32|64))"
23 color constant "(true|false|nil)"
24 color type "\ (Double|String|Float|Boolean|Dictionary|Array|Int)"
25 color type "\ (AnyObject)"
26
27 # Text
28 color constant ""[^"]*""
29
30 # Comments
31 color comment "//.*"
32 color comment "///.*"
33 color comment (s) "/\*\*.*?\*/"
34 color comment "[/**]"