42 lines
1.1 KiB
VimL
42 lines
1.1 KiB
VimL
syntax keyword hblangKeywords
|
|
\ if
|
|
\ loop
|
|
\ fn
|
|
\ return
|
|
\ else
|
|
\ break
|
|
\ continue
|
|
\ struct
|
|
|
|
syntax match hblangNumber "\v<\d+>"
|
|
syntax match hblangNumber "\v<0x\x+([Pp]-?)?\x+>"
|
|
syntax match hblangNumber "\v<0b[01]+>"
|
|
syntax match hblangNumber "\v<0o\o+>"
|
|
|
|
syntax keyword hblangBoolean true false
|
|
|
|
syntax match hblangDirective /@\<\a\+\>/
|
|
syntax match hblangFunction /[a-zA-Z_]\+\ze(/
|
|
|
|
syntax keyword hblangType int bool void
|
|
syntax match hblangType /u\d\+/
|
|
syntax match hblangType /i\d\+/
|
|
|
|
syntax region hblangString start=/"/ skip=/\\"/ end=/"/ oneline
|
|
syntax region hblangComment start=/\/\// end=/\n/ oneline
|
|
|
|
|
|
highlight default link hblangComment Comment
|
|
|
|
highlight default link hblangString String
|
|
highlight default link hblangNumber Number
|
|
highlight default link hblangBoolean Boolean
|
|
|
|
highlight default link hblangOperator Operator
|
|
highlight default link hblangKeywords Keyword
|
|
highlight default link hblangAttributes PreProc
|
|
highlight default link hblangStructure Structure
|
|
highlight default link hblangType Type
|
|
highlight default link hblangFunction Function
|
|
highlight default link hblangDirective PreProc
|