8 - identifier: "fn [a-z0-9_]+"
10 - statement: "\\b(abstract|alignof|as|async|await|become|box|break|const|continue|crate|do|dyn|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"
14 - constant: "\\b[A-Z][A-Z_0-9]+\\b"
16 - constant.number: "\\b[0-9]+\\b"
18 - constant: "\\b(true|false)\\b"
19 # Traits/Enums/Structs/Types/etc.
20 - type: "\\b[A-Z]+[a-zA-Z_0-9]*[a-z]+[a-zA-Z_0-9]*\\b"
21 # Builtin types that start with lowercase.
22 - type: "\\b(bool|str|isize|usize|((i|u)(8|16|32|64))|f32|f64)\\b"
29 - constant.specialChar: '\\.'
37 # NOTE: This is an ugly hack to work around the fact that rust uses
38 # single quotes both for character literals and lifetimes.
39 # Match all character literals.
40 - constant.string: "'(\\\\.|.)'"
41 # Match the '"' literal which would otherwise match
42 # as a double quoted string and destroy the highlighting.
52 - todo: "(TODO|XXX|FIXME):?"
58 - todo: "(TODO|XXX|FIXME):?"