mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-16 05:47:06 +09:00
Add cross-compilation script
This commit is contained in:
34
runtime/syntax/swift.micro
Normal file
34
runtime/syntax/swift.micro
Normal file
@@ -0,0 +1,34 @@
|
||||
##############################################################################
|
||||
# Swift syntax highlighting for Nano.
|
||||
##############################################################################
|
||||
|
||||
syntax "Swift" "\.swift$"
|
||||
|
||||
# Operators
|
||||
color statement "[.:;,+*|=!?\%]" "<" ">" "/" "-" "&"
|
||||
|
||||
# Statements
|
||||
color statement "(class|import|let|var|struct|enum|func|if|else|switch|case|default|for|in|internal|external|unowned|private|public|throws)\ "
|
||||
color statement "(prefix|postfix|operator|extension|lazy|get|set|self|willSet|didSet|override|super|convenience|weak|strong|mutating|return|guard)\ "
|
||||
|
||||
# Keywords
|
||||
color statement "(print)"
|
||||
color statement "(init)"
|
||||
|
||||
# Numbers
|
||||
color constant "([0-9]+)"
|
||||
|
||||
# Standard Types
|
||||
color type "\ ((U)?Int(8|16|32|64))"
|
||||
color constant "(true|false|nil)"
|
||||
color type "\ (Double|String|Float|Boolean|Dictionary|Array|Int)"
|
||||
color type "\ (AnyObject)"
|
||||
|
||||
# Text
|
||||
color constant ""[^"]*""
|
||||
|
||||
# Comments
|
||||
color comment "//.*"
|
||||
color comment "///.*"
|
||||
color comment (s) "/\*\*.*?\*/"
|
||||
color comment "[/**]"
|
||||
Reference in New Issue
Block a user