2002-10-07 22:54:48 +00:00
|
|
|
" Vim syntax file
|
2003-06-03 00:56:09 +00:00
|
|
|
" Language: llvm
|
2006-03-14 05:54:52 +00:00
|
|
|
" Maintainer: The LLVM team, http://llvm.org/
|
2003-06-03 00:56:09 +00:00
|
|
|
" Updated: 2003-06-02
|
2002-10-07 22:54:48 +00:00
|
|
|
|
|
|
|
if version < 600
|
|
|
|
syntax clear
|
|
|
|
elseif exists("b:current_syntax")
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
|
|
|
syn case match
|
|
|
|
|
|
|
|
syn keyword llvmType void bool sbyte ubyte
|
|
|
|
syn keyword llvmType short ushort int uint
|
|
|
|
syn keyword llvmType long ulong float double
|
|
|
|
syn keyword llvmType type label opaque
|
|
|
|
|
|
|
|
syn keyword llvmStatement add sub mul div rem
|
|
|
|
syn keyword llvmStatement and or xor
|
|
|
|
syn keyword llvmStatement setne seteq setlt setgt setle setge
|
|
|
|
|
2005-05-06 06:07:34 +00:00
|
|
|
syn keyword llvmStatement phi tail call cast to select shl shr vaarg vanext
|
2004-10-16 18:24:35 +00:00
|
|
|
syn keyword llvmStatement ret br switch invoke unwind unreachable
|
2002-10-07 22:54:48 +00:00
|
|
|
syn keyword llvmStatement malloc alloca free load store getelementptr
|
|
|
|
|
2004-04-28 19:36:08 +00:00
|
|
|
syn keyword llvmStatement begin end true false zeroinitializer
|
2002-10-07 22:54:48 +00:00
|
|
|
syn keyword llvmStatement declare global constant const
|
2003-04-16 20:25:57 +00:00
|
|
|
syn keyword llvmStatement internal uninitialized external implementation
|
2003-10-10 04:56:26 +00:00
|
|
|
syn keyword llvmStatement linkonce weak appending
|
2004-10-16 18:24:35 +00:00
|
|
|
syn keyword llvmStatement undef null to except target endian pointersize deplibs
|
2005-05-13 20:40:52 +00:00
|
|
|
syn keyword llvmStatement big little volatile fastcc coldcc cc
|
2002-10-07 22:54:48 +00:00
|
|
|
|
|
|
|
"syn match llvmFunction /%[a-zA-Z\$._\-][a-zA-Z\$._\-0-9]*/
|
2003-06-03 00:56:09 +00:00
|
|
|
syn match llvmNumber /\<\d\+\>/
|
|
|
|
syn match llvmNumber /\<\d\+\.\d*\>/
|
2002-10-07 22:54:48 +00:00
|
|
|
|
2003-06-03 00:56:09 +00:00
|
|
|
syn match llvmComment /;.*$/
|
2002-10-07 22:54:48 +00:00
|
|
|
syn region llvmString start=/"/ skip=/\\"/ end=/"/
|
2003-06-03 00:56:09 +00:00
|
|
|
syn match llvmLabel /[\-a-zA-Z\$._0-9]*:/
|
2002-10-07 22:54:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
if version >= 508 || !exists("did_c_syn_inits")
|
|
|
|
if version < 508
|
|
|
|
let did_c_syn_inits = 1
|
|
|
|
command -nargs=+ HiLink hi link <args>
|
|
|
|
else
|
|
|
|
command -nargs=+ HiLink hi def link <args>
|
|
|
|
endif
|
|
|
|
|
|
|
|
HiLink llvmType Type
|
|
|
|
HiLink llvmStatement Statement
|
|
|
|
HiLink llvmNumber Number
|
|
|
|
HiLink llvmComment Comment
|
|
|
|
HiLink llvmString String
|
|
|
|
HiLink llvmLabel Label
|
|
|
|
|
|
|
|
delcommand HiLink
|
|
|
|
endif
|
|
|
|
|
|
|
|
let b:current_syntax = "llvm"
|