5
5
"foldingStopMarker" : " ^\\ s*\\ }" ,
6
6
"patterns" : [
7
7
{"name" : " variable.other.source.rust" ,
8
- "match" : " '[a-zA-Z_][a-zA-Z0-9_]*[^\\ '] "
8
+ "match" : " '[a-zA-Z_][a-zA-Z0-9_]*(?= [^\' ]) "
9
9
},
10
10
{"name" : " string.quoted.single.source.rust" ,
11
11
"begin" : " '" ,
22
22
]
23
23
},
24
24
{"name" : " meta.function.source.rust" ,
25
- "match" : " \\ b(fn)\\ s+([a-zA-Z_][a-zA-Z0-9_]?) [\\ w\\ :,+ \\ '<>]*\\ s*\\ (" ,
25
+ "match" : " \\ b(fn)\\ s+([a-zA-Z_][a-zA-Z0-9_]?[\\ w\\ :,+ \\ '<>]*) \\ s*( \\ () " ,
26
26
"captures" : {
27
27
"1" : {"name" : " keyword.source.rust" },
28
- "2" : {"name" : " entity.name.function.source.rust" }
28
+ "2" : {"name" : " entity.name.function.source.rust" },
29
+ "3" : {"name" : " keyword.operator.rust" }
29
30
}
30
31
},
31
32
{"name" : " keyword.source.rust" ,
32
- "match" : " \\ b(as|break|claim|const|copy|Copy|crate|do|drop|else|extern|for|if|in| impl|let|loop|match|mod|mut|Owned|priv|pub|pure|ref|return|unsafe|use|while|mod|Send|static|trait|struct|enum|type)\\ b"
33
+ "match" : " \\ b(as|break|claim|const|copy|Copy|crate|do|drop|else|extern|for|if|impl|in |let|loop|match|mod|mut|Owned|priv|pub|pure|ref|return|unsafe|use|while|mod|Send|static|trait|struct|enum|type)\\ b"
33
34
},
34
35
{"name" : " storage.type.source.rust" ,
35
36
"match" : " \\ b(Self|m32|m64|m128|f80|f16|f128|int|uint|float|char|bool|u8|u16|u32|u64|f32|f64|i8|i16|i32|i64|str|Option|Either|c_float|c_double|c_void|FILE|fpos_t|DIR|dirent|c_char|c_schar|c_uchar|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|size_t|ptrdiff_t|clock_t|time_t|c_longlong|c_ulonglong|intptr_t|uintptr_t|off_t|dev_t|ino_t|pid_t|mode_t|ssize_t)\\ b"
43
44
{"name" : " support.constant.source.rust" ,
44
45
"match" : " \\ b(EXIT_FAILURE|EXIT_SUCCESS|RAND_MAX|EOF|SEEK_SET|SEEK_CUR|SEEK_END|_IOFBF|_IONBF|_IOLBF|BUFSIZ|FOPEN_MAX|FILENAME_MAX|L_tmpnam|TMP_MAX|O_RDONLY|O_WRONLY|O_RDWR|O_APPEND|O_CREAT|O_EXCL|O_TRUNC|S_IFIFO|S_IFCHR|S_IFBLK|S_IFDIR|S_IFREG|S_IFMT|S_IEXEC|S_IWRITE|S_IREAD|S_IRWXU|S_IXUSR|S_IWUSR|S_IRUSR|F_OK|R_OK|W_OK|X_OK|STDIN_FILENO|STDOUT_FILENO|STDERR_FILENO)\\ b"
45
46
},
46
- {"name" : " meta.preprocessor.source.rust" ,
47
- "match" : " \\ b(\\ w\\ (\\ w\\ )*!)|(#\\ [[\\ w=\\ (\\ )_]+\\ ])\\ b"
47
+ {"name" : " comment.block.preprocessor.rust" ,
48
+ "match" : " ^(\\ w\\ (\\ w\\ )*!)|(#\\ [[\\ w=\\ (\\ )_]+\\ ])$"
49
+ },
50
+ {"name" : " keyword.operator.rust" ,
51
+ "match" : " \\ {|\\ }"
52
+ },
53
+ {"name" : " keyword.operator.rust" ,
54
+ "match" : " \\ [|\\ ]"
55
+ },
56
+ {"name" : " keyword.operator.rust" ,
57
+ "match" : " \\ (|\\ )"
48
58
},
49
59
{"name" : " constant.numeric.integer.source.rust" ,
50
60
"match" : " \\ b(([0-9][0-9_]*)|([0-9][0-9_]*(u|u8|u16|u32|u64))|([0-9][0-9_]*(i|i8|i16|i32|i64)))\\ b"
69
79
{"name" : " comment.block.source.rust" ,
70
80
"begin" : " /\\ *" ,
71
81
"end" : " \\ */"
82
+ },
83
+ {"name" : " keyword.operator.rust" ,
84
+ "match" : " (=>)|(->)|[-:=*,!.+|%/&~@<>;]"
85
+ },
86
+ {"name" : " support.function.rust" ,
87
+ "match" : " _"
72
88
}
73
89
],
74
90
"repository" : {
78
94
}
79
95
},
80
96
"uuid" : " 4339386b-4d67-4f0e-9e78-09ecbcddf71d"
81
- }
97
+ }
0 commit comments