mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 06:12:35 +09:00
Add cross-compilation script
This commit is contained in:
36
runtime/syntax/rust.micro
Normal file
36
runtime/syntax/rust.micro
Normal file
@@ -0,0 +1,36 @@
|
||||
# Nano configuration for Rust
|
||||
# Copyright 2015 The Rust Project Developers.
|
||||
#
|
||||
# NOTE: Rules are applied in order: later rules re-colorize matching text.
|
||||
syntax "Rust" "\.rs"
|
||||
|
||||
# function definition
|
||||
color identifier "fn [a-z0-9_]+"
|
||||
|
||||
# Reserved words
|
||||
color statement "\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"
|
||||
|
||||
# macros
|
||||
color special "[a-z_]+!"
|
||||
|
||||
# Constants
|
||||
color constant "[A-Z][A-Z_]+"
|
||||
|
||||
# Traits/Enums/Structs/Types/etc.
|
||||
color type "[A-Z][a-z]+"
|
||||
|
||||
# Strings
|
||||
color constant "\".*\""
|
||||
color constant (s) "\".*?\""
|
||||
# NOTE: This isn't accurate but matching "#{0,} for the end of the string is too liberal
|
||||
color constant (s) "r#+\".*?\"#+"
|
||||
|
||||
# Comments
|
||||
color comment "//.*"
|
||||
color comment (s) "/\*.*?\*/"
|
||||
|
||||
# Attributes
|
||||
color special (s) "#!\[.*?\]"
|
||||
|
||||
# Some common markers
|
||||
color todo "(XXX|TODO|FIXME|\?\?\?)"
|
||||
Reference in New Issue
Block a user