mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-06 07:00:24 +09:00
36 lines
962 B
YAML
36 lines
962 B
YAML
filetype: rust
|
|
|
|
detect:
|
|
filename: "\\.rs"
|
|
|
|
rules:
|
|
- identifier.class: "fn [a-z0-9_]+"
|
|
- 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"
|
|
- identifier.macro: "[a-z_]+!"
|
|
- constant: "[A-Z][A-Z_]+"
|
|
- constant.number: "\\b[0-9]+\\b"
|
|
- type: "[A-Z][a-z]+"
|
|
- constant.string: "\\\".*\\\""
|
|
- constant.string:
|
|
start: "\\\".*\\\\$"
|
|
end: ".*\\\""
|
|
rules: []
|
|
|
|
- special:
|
|
start: "r#+\\\""
|
|
end: "\\\"#+"
|
|
rules: []
|
|
|
|
- comment: "//.*"
|
|
- comment:
|
|
start: "/\\*"
|
|
end: "\\*/"
|
|
rules: []
|
|
|
|
- special:
|
|
start: "#!\\["
|
|
end: "\\]"
|
|
rules: []
|
|
|
|
- todo: "(XXX|TODO|FIXME|\\?\\?\\?)"
|