]> git.lizzy.rs Git - micro.git/blobdiff - runtime/syntax/rust.micro
Update yaml header
[micro.git] / runtime / syntax / rust.micro
index 38030ec51653806384a573d77c1f95bf65e285d3..560d4242a3a1f39abde20d349983cbc34266c3b5 100644 (file)
@@ -2,7 +2,7 @@
 # Copyright 2015 The Rust Project Developers.
 #
 # NOTE: Rules are applied in order: later rules re-colorize matching text.
-syntax "Rust" "\.rs"
+syntax "rust" "\.rs"
 
 # function definition
 color identifier "fn [a-z0-9_]+"
@@ -16,21 +16,24 @@ color special "[a-z_]+!"
 # Constants
 color constant "[A-Z][A-Z_]+"
 
+# Numbers
+color constant.number "\b[0-9]+\b"
+
 # Traits/Enums/Structs/Types/etc.
 color type "[A-Z][a-z]+"
 
 # Strings
-color constant "\".*\""
-color constant (s) "\".*?\""
+color constant.string "\".*\""
+color constant.string start="\".*\\$" end=".*\""
 # NOTE: This isn't accurate but matching "#{0,} for the end of the string is too liberal
-color constant (s) "r#+\".*?\"#+"
+color green start="r#+\"" end="\"#+"
 
 # Comments
 color comment "//.*"
-color comment (s) "/\*.*?\*/"
+color comment start="/\*" end="\*/"
 
 # Attributes
-color special (s) "#!\[.*?\]"
+color special start="#!\[" end="\]"
 
 # Some common markers
 color todo "(XXX|TODO|FIXME|\?\?\?)"