authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2015-12-09 12:32:33-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2015-12-09 12:32:33-07:00
log28debf1fc3b1b3049dd9959fb7ecbd874a5f8084
treec908e0a8eb7a1ae39138410fe715f527e029774e
parent367ea908bdc9a9dff04b00bafd8d7df5f6dfcbde

doc: update vim syntax


1 files changed, 22 insertions(+), 1 deletions(-)

doc/vim/syntax/zig.vim+22-1
...@@ -7,9 +7,21 @@ if exists("b:current_syntax")...@@ -7,9 +7,21 @@ if exists("b:current_syntax")
7 finish7 finish
8endif8endif
99
10syn keyword zigKeyword fn return mut const extern unreachable export pub as use if else let void goto10syn keyword zigKeyword fn return mut const extern unreachable export pub as use while
11syn keyword zigKeyword if else let void goto type enum struct continue break match
11syn keyword zigType bool i8 u8 i16 u16 i32 u32 i64 u64 isize usize f32 f64 f12812syn keyword zigType bool i8 u8 i16 u16 i32 u32 i64 u64 isize usize f32 f64 f128
1213
14syn keyword zigConstant null
15
16syn keyword zigBoolean true false
17
18syn match zigDecNumber display "\<[0-9][0-9_]*\%([iu]\%(size\|8\|16\|32\|64\)\)\="
19syn match zigHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
20syn match zigOctNumber display "\<0o[0-7_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
21syn match zigBinNumber display "\<0b[01_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
22
23syn match zigShebang /\%^#![^[].*/
24
13syn region zigCommentLine start="//" end="$" contains=zigTodo,@Spell25syn region zigCommentLine start="//" end="$" contains=zigTodo,@Spell
14syn region zigCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=zigTodo,@Spell26syn region zigCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=zigTodo,@Spell
15syn region zigCommentBlock matchgroup=zigCommentBlock start="/\*\%(!\|\*[*/]\@!\)\@!" end="\*/" contains=zigTodo,zigCommentBlockNest,@Spell27syn region zigCommentBlock matchgroup=zigCommentBlock start="/\*\%(!\|\*[*/]\@!\)\@!" end="\*/" contains=zigTodo,zigCommentBlockNest,@Spell
...@@ -30,8 +42,14 @@ syn region zigString start='b\?r\z(#*\)"' end='"\z1' contains=@Spell...@@ -30,8 +42,14 @@ syn region zigString start='b\?r\z(#*\)"' end='"\z1' contains=@Spell
3042
31let b:current_syntax = "zig"43let b:current_syntax = "zig"
3244
45hi def link zigDecNumber zigNumber
46hi def link zigHexNumber zigNumber
47hi def link zigOctNumber zigNumber
48hi def link zigBinNumber zigNumber
49
33hi def link zigKeyword Keyword50hi def link zigKeyword Keyword
34hi def link zigType Type51hi def link zigType Type
52hi def link zigShebang Comment
35hi def link zigCommentLine Comment53hi def link zigCommentLine Comment
36hi def link zigCommentLineDoc SpecialComment54hi def link zigCommentLineDoc SpecialComment
37hi def link zigCommentBlock zigCommentLine55hi def link zigCommentBlock zigCommentLine
...@@ -42,3 +60,6 @@ hi def link zigString String...@@ -42,3 +60,6 @@ hi def link zigString String
42hi def link zigEscape Special60hi def link zigEscape Special
43hi def link zigEscapeUnicode zigEscape61hi def link zigEscapeUnicode zigEscape
44hi def link zigEscapeError Error62hi def link zigEscapeError Error
63hi def link zigBoolean Boolean
64hi def link zigConstant Constant
65hi def link zigNumber Number