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.
11 color magenta "fn [a-z0-9_]+"
14 color yellow "\<(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)\>"
20 color magenta "[A-Z][A-Z_]+"
22 # Traits/Enums/Structs/Types/etc.
23 color magenta "[A-Z][a-z]+"
27 color green start="\".*\\$" end=".*\""
28 # NOTE: This isn't accurate but matching "#{0,} for the end of the string is too liberal
29 color green start="r#+\"" end="\"#+"
33 color blue start="/\*" end="\*/"
36 color magenta start="#!\[" end="\]"
39 color brightcyan "(XXX|TODO|FIXME|\?\?\?)"
42 color ,green "[[:space:]]+$"