1 # Nano configuration for Rust
2 # Copyright 2015 The Rust Project Developers.
4 # NOTE: Rules are applied in order: later rules re-colorize matching text.
8 color magenta "fn [a-z0-9_]+"
11 color yellow "\b(abstract|alignof|as|become|box|break|const|continue|crate|do|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|offsetof|override|priv|pub|pure|ref|return|sizeof|static|self|struct|super|true|trait|type|typeof|unsafe|unsized|use|virtual|where|while|yield)\b"
17 color magenta "[A-Z][A-Z_]+"
19 # Traits/Enums/Structs/Types/etc.
20 color magenta "[A-Z][a-z]+"
24 color green "(?s)\".*\\$.*?.*\""
25 # NOTE: This isn't accurate but matching "#{0,} for the end of the string is too liberal
26 color green "(?s)r#+\".*?\"#+"
30 color blue "(?s)/\*.*?\*/"
33 color magenta "(?s)#!\[.*?\]"
36 color brightcyan "(XXX|TODO|FIXME|\?\?\?)"