39 lines · plain
1" Vim syntax file2" Language: mir3" Maintainer: The LLVM team, http://llvm.org/4" Version: $Revision$5 6syn case match7 8" FIXME: MIR doesn't actually match LLVM IR. Stop including it all as a9" fallback once enough is implemented.10" See the MIR LangRef: https://llvm.org/docs/MIRLangRef.html11unlet b:current_syntax " Unlet so that the LLVM syntax will load12runtime! syntax/llvm.vim13unlet b:current_syntax14 15syn match mirType /\<[sp]\d\+\>/16 17" Opcodes. Matching instead of listing them because individual targets can add18" these. FIXME: Maybe use some more context to make this more accurate?19syn match mirStatement /\<[A-Z][A-Za-z0-9_]*\>/20 21syn match mirPReg /$[-a-zA-Z$._][-a-zA-Z$._0-9]*/22 23if version >= 508 || !exists("did_c_syn_inits")24 if version < 50825 let did_c_syn_inits = 126 command -nargs=+ HiLink hi link <args>27 else28 command -nargs=+ HiLink hi def link <args>29 endif30 31 HiLink mirType Type32 HiLink mirStatement Statement33 HiLink mirPReg Identifier34 35 delcommand HiLink36endif37 38let b:current_syntax = "mir"39