summaryrefslogtreecommitdiffstats
path: root/misc/syntax/rust.syntax
blob: 74a507807d405aa955a12784d61d40b1ba5b30f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
context default

# keywords
    keyword whole as yellow
    keyword whole break yellow
    keyword whole const yellow
    keyword whole continue yellow
    keyword whole crate yellow
    keyword whole else yellow
    keyword whole enum yellow
    keyword whole extern yellow
    keyword whole fn yellow
    keyword whole for yellow
    keyword whole if yellow
    keyword whole impl yellow
    keyword whole in yellow
    keyword whole let yellow
    keyword whole loop yellow
    keyword whole match yellow
    keyword whole mod yellow
    keyword whole move yellow
    keyword whole mut yellow
    keyword whole pub yellow
    keyword whole ref yellow
    keyword whole return yellow
    keyword whole Self yellow
    keyword whole self brightgreen
    keyword whole static yellow
    keyword whole struct yellow
    keyword whole super yellow
    keyword whole trait yellow
    keyword whole type yellow
    keyword whole unsafe yellow
    keyword whole use yellow
    keyword whole where yellow
    keyword whole while yellow

# keywords reserved for future use
    keyword whole abstract red
    keyword whole alignof red
    keyword whole become red
    keyword whole box red
    keyword whole do red
    keyword whole final red
    keyword whole macro red
    keyword whole offsetof red
    keyword whole override red
    keyword whole priv red
    keyword whole proc red
    keyword whole pure red
    keyword whole sizeof red
    keyword whole typeof red
    keyword whole unsized red
    keyword whole virtual red
    keyword whole yield red

# common types
    keyword whole bool brightcyan
    keyword whole char brightcyan
    keyword whole isize brightcyan
    keyword whole usize brightcyan

    keyword whole i8 brightcyan
    keyword whole i16 brightcyan
    keyword whole i32 brightcyan
    keyword whole i64 brightcyan
    keyword whole u8 brightcyan
    keyword whole u16 brightcyan
    keyword whole u32 brightcyan
    keyword whole u64 brightcyan
    keyword whole isize brightcyan
    keyword whole usize brightcyan
    keyword whole f32 brightcyan
    keyword whole f64 brightcyan

    keyword whole str brightcyan
    keyword whole String brightcyan
    keyword whole Vec brightcyan
    keyword whole Option brightcyan
    keyword whole Result brightcyan

# constants
    keyword whole false brightgreen
    keyword whole true brightgreen
    keyword whole Some brightgreen
    keyword whole None brightgreen
    keyword whole Ok brightgreen
    keyword whole Err brightgreen

# macros
    keyword whole +! brightmagenta
    keyword whole $+ brightblue

# numbers
    wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.

    keyword whole 0x\{0123456789abcdefABCDEF_\}\[0123456789abcdefABCDEF_\] brightgreen
    keyword whole 0o\{01234567_\}\[01234567_\] brightgreen
    keyword whole 0b\{01_\}\[01_\] brightgreen
    keyword whole \{0123456789_\}\[0123456789_\] brightgreen
    keyword whole \[0123456789_\]\.\{0123456789_\}\[0123456789_\] brightgreen
    keyword whole \{0123456789_\}\[0123456789_\]\.\[0123456789_\] brightgreen
    keyword whole \{0123456789_\}\[0123456789_\]\{eE\}\{0123456789_\}\[0123456789_\] brightgreen
    keyword whole \{0123456789_\}\[0123456789_\]\{eE\}\{\-\+\}\{0123456789_\}\[0123456789_\] brightgreen
    keyword whole \{0123456789_\}\[0123456789_\]\.\{0123456789_\}\[0123456789_\]\{eE\}\{0123456789_\}\[0123456789_\] brightgreen
    keyword whole \{0123456789_\}\[0123456789_\]\.\{0123456789_\}\[0123456789_\]\{eE\}\{\-\+\}\{0123456789_\}\[0123456789_\] brightgreen

# char
    keyword '\\'' brightgreen
    keyword '*' brightgreen

# comments

context /\* \*/ brown
    spellcheck
    keyword whole BUG brightred
    keyword whole FixMe brightred
    keyword whole FIXME brightred
    keyword whole Note brightred
    keyword whole NOTE brightred
    keyword whole ToDo brightred
    keyword whole TODO brightred
    keyword !!\[!\] brightred
    keyword ??\[?\] brightred


context // \n brown
    spellcheck
    keyword whole BUG brightred
    keyword whole FixMe brightred
    keyword whole FIXME brightred
    keyword whole Note brightred
    keyword whole NOTE brightred
    keyword whole ToDo brightred
    keyword whole TODO brightred
    keyword !!\[!\] brightred
    keyword ??\[?\] brightred

# strings
context " " green
    spellcheck
    keyword \\" brightgreen
    keyword \\' brightgreen
    keyword \\\\ brightgreen
    keyword \\\{abtnvfr0\} brightgreen


context r#" "# green
    spellcheck


context #[ ] white
context #![ ] white