File tree Expand file tree Collapse file tree 3 files changed +30
-7
lines changed Expand file tree Collapse file tree 3 files changed +30
-7
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ patterns:
1515 - include : ' #keyword'
1616 - include : ' #type'
1717 - include : ' #type-int'
18+ - include : ' #type-float'
1819 - include : ' #type-c'
1920 - include : ' #boolean'
2021 - include : ' #operator'
@@ -62,17 +63,21 @@ repository:
6263 name : constant.language.zig
6364
6465 keyword :
65- match : ' (?<!\w)(fn|use |test|@[^\"\d][a-zA-Z_]\w*)\b'
66+ match : ' (?<!\w)(fn|usingnamespace |test|@[^\"\d][a-zA-Z_]\w*)\b'
6667 name : support.function.zig
6768
6869 type :
69- match : ' \b(bool|f16|f32|f64|f128|comptime_float| void|noreturn|type|anyerror|promise)\b'
70+ match : ' \b(bool|void|noreturn|type|anyerror|promise)\b'
7071 name : storage.type.zig
7172
7273 type-int :
73- match : ' \b(?<!\.)([iu][1 -9]\d*|i0|u0|isize|usize |comptime_int)\b'
74+ match : ' \b(?<!\.)([iu][0 -9]\d*|[iu]size |comptime_int)\b'
7475 name : storage.type.zig.integer
7576
77+ type-float :
78+ match : ' \b(f16|f32|f64|f128|comptime_float)\b'
79+ name : storage.type.zig.float
80+
7681 type-c :
7782 match : ' \b(c_short|c_ushort|c_int|c_uint|c_long|c_ulong|c_longlong|c_ulonglong|c_longdouble|c_void)\b'
7883 name : storage.type.zig.c_compat
Original file line number Diff line number Diff line change 5454 <key >include </key >
5555 <string >#type-int </string >
5656 </dict >
57+ <dict >
58+ <key >include </key >
59+ <string >#type-float </string >
60+ </dict >
5761 <dict >
5862 <key >include </key >
5963 <string >#type-c </string >
294298 <key >keyword </key >
295299 <dict >
296300 <key >match </key >
297- <string >(?< !\w)(fn|use |test|@[^\"\d][a-zA-Z_]\w*)\b </string >
301+ <string >(?< !\w)(fn|usingnamespace |test|@[^\"\d][a-zA-Z_]\w*)\b </string >
298302 <key >name </key >
299303 <string >support.function.zig </string >
300304 </dict >
410414 <key >type </key >
411415 <dict >
412416 <key >match </key >
413- <string >\b(bool|f16|f32|f64|f128|comptime_float| void|noreturn|type|anyerror|promise)\b </string >
417+ <string >\b(bool|void|noreturn|type|anyerror|promise)\b </string >
414418 <key >name </key >
415419 <string >storage.type.zig </string >
416420 </dict >
421425 <key >name </key >
422426 <string >storage.type.zig.c_compat </string >
423427 </dict >
428+ <key >type-float </key >
429+ <dict >
430+ <key >match </key >
431+ <string >\b(f16|f32|f64|f128|comptime_float)\b </string >
432+ <key >name </key >
433+ <string >storage.type.zig.float </string >
434+ </dict >
424435 <key >type-int </key >
425436 <dict >
426437 <key >match </key >
427- <string >\b([iu][1 -9]\d*|i0|u0|isize|usize |comptime_int)\b </string >
438+ <string >\b(? < !\.)( [iu][0 -9]\d*|[iu]size |comptime_int)\b </string >
428439 <key >name </key >
429440 <string >storage.type.zig.integer </string >
430441 </dict >
Original file line number Diff line number Diff line change @@ -18,14 +18,16 @@ while for
1818
1919null undefined
2020
21- fn use test
21+ fn usingnamespace test
2222
2323bool f16 f32 f64 f128 void noreturn type anyerror
2424
2525promise
2626
2727i2 u2 i3 u3 i4 u4 i5 u5 i6 u6 i7 u7 i8 u8 i16 u16 u29 i29 i32 u32 i64 u64 i128 u128 isize usize
2828
29+ .i368 .i686 .i23
30+
2931c_short c_ushort c_int c_uint c_long c_ulong c_longlong c_ulonglong c_longdouble c_void
3032
3133true false
5052
51530b1
5254
55+ 123.i812
56+
5357/// TODO blah blah
5458// TODO blah blah
5559
@@ -70,6 +74,9 @@ extern fn barfoo();
7074 "\" hello\" "
7175'\' '
7276'\a '
77+
78+ @"overloaded"
79+
7380@addWithOverflow
7481@alignCast
7582@alignOf
You can’t perform that action at this time.
0 commit comments