Files
ivy/mie.vim/syntax/mie.vim

87 lines
2.6 KiB
VimL
Raw Normal View History

if exists('b:current_syntax')
finish
endif
let s:save_cpo = &cpoptions
set cpoptions&vim
syn keyword mieUnspecifiedStatement record data define type global
syn keyword mieInstruction
\ alloca load store call br cmp
\ add sub div mul msg
\ getelementptr switch ret
syn keyword mieInstructionFlag
\ eq gt ge lt le
syn match mieRegister "%[0-9]\>"
syn match mieRegister "%[1-9][0-9]\+\>"
syn match mieRegister "%[A-Za-z\.][A-Za-z0-9\.]*\>"
syn match mieIdentifier /@\(\w\+\)\(\.\(\w\+\)\)*\>/
syn match mieIdentifier /@\.\(\w\+\)\(\.\(\w\+\)\)*\>/
syn match mieLabel /\(\w\+\)\(\.\(\w\+\)\)*\:/
syn keyword mieType id ptr str atom label void
syn keyword mieTypeModifier external
syn match mieType "i[0-9]\>"
syn match mieType "i[1-9][0-9]\+\>"
syn keyword mieBlockType lambda instance static class
syn match mieFieldIndex /#[0-9]\+:\>/
syn match mieFieldIndex /#-[0-9]\+:\>/
syn match mieFieldIndex /#0x[:xdigit:]\+:\>/
syn match mieFieldIndex /#-0x[:xdigit:]\+:\>/
syn region mieString start=+"+ end=+"\%(u8\)\=+ end=+$+ extend
syn match mieInteger /#[0-9]\+\>/
syn match mieInteger /#-[0-9]\+\>/
syn match mieInteger /#0x[:xdigit:]\+\>/
syn match mieInteger /#-0x[:xdigit:]\+\>/
syn keyword mieTodo contained TODO FIXME XXX NOTE HACK TBD
syn region mieBlockComment start="/\*" end="\*/" contains=mieTodo,mieBlockComment
syn match mieLineComment ";.*$" contains=mieTodo,mieBlockComment
syn cluster mieComment contains=mieLineComment,mieBlockComment
syn match mieBrackets "[[\]]" display
syn match mieParens "[()]" display
syn match ivyPropertySymbol "\$" display
" The default highlighting.
hi def link mieUnspecifiedStatement Statement
hi def link ivyPropertySymbol Statement
hi def link mieInteger Number
hi def link mieParens Delimiter
hi def link mieBraces Structure
hi def link miePropertyName @property
hi def link mieFieldName @variable.parameter
hi def link mieClassName Type
hi def link mieLambdaName @variable.parameter
hi def link mieInstruction Function
hi def link mieInstructionFlag StorageClass
hi def link mieIdentifier Identifier
hi def link mieLabel Tag
hi def link mieIndexBase @variable.builtin
hi def link mieRegister Constant
hi def link mieString String
hi def link mieType Type
hi def link mieBlockType @attribute
hi def link mieTypeModifier @attribute
hi def link mieComment Comment
hi def link mieLineComment mieComment
hi def link mieBlockComment mieComment
hi def link mieLineContinuation mieComment
hi def link mieIdent @variable.builtin
hi def link mieAtom Constant
let b:current_syntax = 'mie'
let &cpoptions = s:save_cpo
unlet s:save_cpo