brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 024a795 Raw
51 lines · plain
1" Vim syntax file2" Language:   mir3" Maintainer: The LLVM team, http://llvm.org/4" Version:      $Revision$5 6if version < 6007  syntax clear8elseif exists("b:current_syntax")9  finish10endif11 12syn case match13 14" MIR is embedded in a yaml container, so we load all of the yaml syntax.15runtime! syntax/yaml.vim16unlet b:current_syntax17 18" The first document of a file is allowed to contain an LLVM IR module inside19" a top-level yaml block string.20syntax include @LLVM syntax/llvm.vim21" FIXME: This should only be allowed for the first document of the file22syntax region llvm start=/\(^---\s*|\)\@<=/ end=/\(^\.\.\.\)\@=/ contains=@LLVM23 24" The `body:` field of a document contains the MIR dump of the function25syntax include @MIR syntax/machine-ir.vim26syntax region mir start=/\(^body:\s*|\)\@<=/ end=/\(^[^[:space:]]\)\@=/ contains=@MIR27 28" Syntax-highlight lit test commands and bug numbers.29syn match  mirSpecialComment /#\s*PR\d*\s*$/30syn match  mirSpecialComment /#\s*REQUIRES:.*$/31syn match  mirSpecialComment /#\s*RUN:.*$/32syn match  mirSpecialComment /#\s*ALLOW_RETRIES:.*$/33syn match  mirSpecialComment /#\s*CHECK:.*$/34syn match  mirSpecialComment "\v#\s*CHECK-(NEXT|NOT|DAG|SAME|LABEL):.*$"35syn match  mirSpecialComment /#\s*XFAIL:.*$/36 37if version >= 508 || !exists("did_c_syn_inits")38  if version < 50839    let did_c_syn_inits = 140    command -nargs=+ HiLink hi link <args>41  else42    command -nargs=+ HiLink hi def link <args>43  endif44 45  HiLink mirSpecialComment SpecialComment46 47  delcommand HiLink48endif49 50let b:current_syntax = "mir"51