hblang.vim/syntax/hblang.vim

42 lines
1.1 KiB
VimL
Raw Normal View History

2024-09-04 03:34:44 -05:00
syntax keyword hblangKeywords
2024-09-04 04:16:35 -05:00
\ if
\ loop
\ fn
\ return
\ else
\ break
\ continue
\ struct
2024-09-04 03:34:44 -05:00
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(/
2024-09-04 04:16:35 -05:00
syntax keyword hblangType int bool void
syntax match hblangType /u\d\+/
syntax match hblangType /i\d\+/
2024-09-04 03:34:44 -05:00
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