Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 1 | " Vim syntax file for the D programming language (version 1.076 and 2.063). |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 2 | " |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 3 | " Language: D |
| 4 | " Maintainer: Jesse Phillips <Jesse.K.Phillips+D@gmail.com> |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 5 | " Last Change: 2013 May 21 |
| 6 | " Version: 0.25 |
Bram Moolenaar | 9db9d9c | 2010-01-16 14:29:14 +0100 | [diff] [blame] | 7 | " |
| 8 | " Contributors: |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 9 | " - Jason Mills: original Maintainer |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 10 | " - Kirk McDonald |
| 11 | " - Tim Keating |
| 12 | " - Frank Benoit |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 13 | " - Shougo Matsushita |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 14 | " - Ellery Newcomer |
| 15 | " - Steven N. Oliver |
| 16 | " - Sohgo Takeuchi |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 17 | " - Robert Clipsham |
Bram Moolenaar | 9db9d9c | 2010-01-16 14:29:14 +0100 | [diff] [blame] | 18 | " |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 19 | " Please submit bugs/comments/suggestions to the github repo: |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 20 | " https://github.com/JesseKPhillips/d.vim |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 21 | " |
| 22 | " Options: |
Bram Moolenaar | 9db9d9c | 2010-01-16 14:29:14 +0100 | [diff] [blame] | 23 | " d_comment_strings - Set to highlight strings and numbers in comments. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 24 | " |
Bram Moolenaar | 9db9d9c | 2010-01-16 14:29:14 +0100 | [diff] [blame] | 25 | " d_hl_operator_overload - Set to highlight D's specially named functions |
| 26 | " that when overloaded implement unary and binary operators (e.g. opCmp). |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 27 | " |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 28 | " d_hl_object_types - Set to highlight some common types from object.di. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 29 | |
| 30 | " Quit when a syntax file was already loaded |
| 31 | if exists("b:current_syntax") |
| 32 | finish |
| 33 | endif |
| 34 | |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 35 | " Support cpoptions |
| 36 | let s:cpo_save = &cpo |
| 37 | set cpo&vim |
| 38 | |
| 39 | " Set the current syntax to be known as d |
| 40 | let b:current_syntax = "d" |
| 41 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 42 | " Keyword definitions |
| 43 | " |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 44 | syn keyword dExternal contained import module |
| 45 | syn keyword dAssert assert |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 46 | syn keyword dConditional if else switch |
| 47 | syn keyword dBranch goto break continue |
| 48 | syn keyword dRepeat while for do foreach foreach_reverse |
| 49 | syn keyword dBoolean true false |
| 50 | syn keyword dConstant null |
| 51 | syn keyword dConstant __FILE__ __LINE__ __EOF__ __VERSION__ |
| 52 | syn keyword dConstant __DATE__ __TIME__ __TIMESTAMP__ __VENDOR__ |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 53 | syn keyword dConstant __MODULE__ __FUNCTION__ __PRETTY_FUNCTION__ |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 54 | syn keyword dTypedef alias typedef |
| 55 | syn keyword dStructure template interface class struct union |
| 56 | syn keyword dEnum enum |
| 57 | syn keyword dOperator new delete typeof typeid cast align is |
| 58 | syn keyword dOperator this super |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 59 | if exists("d_hl_operator_overload") |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 60 | syn keyword dOpOverload opNeg opCom opPostInc opPostDec opCast opAdd |
| 61 | syn keyword dOpOverload opSub opSub_r opMul opDiv opDiv_r opMod |
| 62 | syn keyword dOpOverload opMod_r opAnd opOr opXor opShl opShl_r opShr |
| 63 | syn keyword dOpOverload opShr_r opUShr opUShr_r opCat |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 64 | syn keyword dOpOverload opCat_r opEquals opCmp |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 65 | syn keyword dOpOverload opAssign opAddAssign opSubAssign opMulAssign |
| 66 | syn keyword dOpOverload opDivAssign opModAssign opAndAssign |
| 67 | syn keyword dOpOverload opOrAssign opXorAssign opShlAssign |
| 68 | syn keyword dOpOverload opShrAssign opUShrAssign opCatAssign |
| 69 | syn keyword dOpOverload opIndex opIndexAssign opIndexOpAssign |
| 70 | syn keyword dOpOverload opCall opSlice opSliceAssign opSliceOpAssign |
| 71 | syn keyword dOpOverload opPos opAdd_r opMul_r opAnd_r opOr_r opXor_r |
| 72 | syn keyword dOpOverload opIn opIn_r opPow opDispatch opStar opDot |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 73 | syn keyword dOpOverload opApply opApplyReverse opDollar |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 74 | syn keyword dOpOverload opUnary opIndexUnary opSliceUnary |
| 75 | syn keyword dOpOverload opBinary opBinaryRight |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 76 | endif |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 77 | |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 78 | syn keyword dType byte ubyte short ushort int uint long ulong cent ucent |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 79 | syn keyword dType void bool Object |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 80 | syn keyword dType float double real |
| 81 | syn keyword dType ushort int uint long ulong float |
| 82 | syn keyword dType char wchar dchar string wstring dstring |
| 83 | syn keyword dType ireal ifloat idouble creal cfloat cdouble |
| 84 | syn keyword dType size_t ptrdiff_t sizediff_t equals_t hash_t |
| 85 | if exists("d_hl_object_types") |
| 86 | syn keyword dType Object Throwable AssociativeArray Error Exception |
| 87 | syn keyword dType Interface OffsetTypeInfo TypeInfo TypeInfo_Typedef |
| 88 | syn keyword dType TypeInfo_Enum TypeInfo_Pointer TypeInfo_Array |
| 89 | syn keyword dType TypeInfo_StaticArray TypeInfo_AssociativeArray |
| 90 | syn keyword dType TypeInfo_Function TypeInfo_Delegate TypeInfo_Class |
| 91 | syn keyword dType ClassInfo TypeInfo_Interface TypeInfo_Struct |
| 92 | syn keyword dType TypeInfo_Tuple TypeInfo_Const TypeInfo_Invariant |
| 93 | syn keyword dType TypeInfo_Shared TypeInfo_Inout MemberInfo |
| 94 | syn keyword dType MemberInfo_field MemberInfo_function ModuleInfo |
| 95 | endif |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 96 | syn keyword dDebug deprecated unittest invariant |
| 97 | syn keyword dExceptions throw try catch finally |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 98 | syn keyword dScopeDecl public protected private export package |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 99 | syn keyword dStatement debug return with |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 100 | syn keyword dStatement function delegate __ctfe mixin macro __simd |
| 101 | syn keyword dStatement in out body |
| 102 | syn keyword dStorageClass contained in out scope |
| 103 | syn keyword dStorageClass inout ref lazy pure nothrow |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 104 | syn keyword dStorageClass auto static override final abstract volatile |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 105 | syn keyword dStorageClass __gshared __vector |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 106 | syn keyword dStorageClass synchronized shared immutable const lazy |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 107 | syn keyword dIdentifier _arguments _argptr __vptr __monitor |
| 108 | syn keyword dIdentifier _ctor _dtor __argTypes __overloadset |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 109 | syn keyword dScopeIdentifier contained exit success failure |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 110 | syn keyword dTraitsIdentifier contained isAbstractClass isArithmetic |
| 111 | syn keyword dTraitsIdentifier contained isAssociativeArray isFinalClass |
| 112 | syn keyword dTraitsIdentifier contained isPOD isNested isFloating |
| 113 | syn keyword dTraitsIdentifier contained isIntegral isScalar isStaticArray |
| 114 | syn keyword dTraitsIdentifier contained isUnsigned isVirtualFunction |
| 115 | syn keyword dTraitsIdentifier contained isVirtualMethod isAbstractFunction |
| 116 | syn keyword dTraitsIdentifier contained isFinalFunction isStaticFunction |
| 117 | syn keyword dTraitsIdentifier contained isRef isOut isLazy hasMember |
| 118 | syn keyword dTraitsIdentifier contained identifier getAttributes getMember |
| 119 | syn keyword dTraitsIdentifier contained getOverloads getProtection |
| 120 | syn keyword dTraitsIdentifier contained getVirtualFunctions |
| 121 | syn keyword dTraitsIdentifier contained getVirtualMethods parent |
| 122 | syn keyword dTraitsIdentifier contained classInstanceSize allMembers |
| 123 | syn keyword dTraitsIdentifier contained derivedMembers isSame compiles |
| 124 | syn keyword dPragmaIdentifier contained lib msg startaddress GNU_asm |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 125 | syn keyword dExternIdentifier contained Windows Pascal Java System D |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 126 | syn keyword dAttribute contained safe trusted system |
| 127 | syn keyword dAttribute contained property disable |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 128 | syn keyword dVersionIdentifier contained DigitalMars GNU LDC SDC D_NET |
| 129 | syn keyword dVersionIdentifier contained X86 X86_64 ARM PPC PPC64 IA64 MIPS MIPS64 Alpha |
| 130 | syn keyword dVersionIdentifier contained SPARC SPARC64 S390 S390X HPPA HPPA64 SH SH64 |
| 131 | syn keyword dVersionIdentifier contained linux Posix OSX FreeBSD Windows Win32 Win64 |
| 132 | syn keyword dVersionIdentifier contained OpenBSD BSD Solaris AIX SkyOS SysV3 SysV4 Hurd |
| 133 | syn keyword dVersionIdentifier contained Cygwin MinGW |
| 134 | syn keyword dVersionIdentifier contained LittleEndian BigEndian |
| 135 | syn keyword dVersionIdentifier contained D_InlineAsm_X86 D_InlineAsm_X86_64 |
| 136 | syn keyword dVersionIdentifier contained D_Version2 D_Coverage D_Ddoc D_LP64 D_PIC |
| 137 | syn keyword dVersionIdentifier contained unittest none all |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 138 | |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 139 | syn cluster dComment contains=dNestedComment,dBlockComment,dLineComment |
| 140 | |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 141 | " Highlight the sharpbang |
| 142 | syn match dSharpBang "\%^#!.*" display |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 143 | |
Bram Moolenaar | 9db9d9c | 2010-01-16 14:29:14 +0100 | [diff] [blame] | 144 | " Attributes/annotations |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 145 | syn match dAnnotation "@[_$a-zA-Z][_$a-zA-Z0-9_]*\>" contains=dAttribute |
| 146 | |
| 147 | " Version Identifiers |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 148 | syn match dVersion "\<version\>" |
| 149 | syn match dVersion "\<version\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+7 contains=dVersionIdentifier |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 150 | |
| 151 | " Scope Identifiers |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 152 | syn match dStatement "\<scope\>" |
| 153 | syn match dStatement "\<scope\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+5 contains=dScopeIdentifier |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 154 | |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 155 | " Traits Statement |
| 156 | syn match dStatement "\<__traits\>" |
| 157 | syn match dStatement "\<__traits\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+8 contains=dTraitsIdentifier |
| 158 | |
| 159 | " Pragma Statement |
| 160 | syn match dPragma "\<pragma\>" |
| 161 | syn match dPragma "\<pragma\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+8 contains=dPragmaIdentifier |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 162 | |
| 163 | " Necessary to highlight C++ in extern modifiers. |
| 164 | syn match dExternIdentifier "C\(++\)\?" contained |
| 165 | |
| 166 | " Extern Identifiers |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 167 | syn match dExternal "\<extern\>" |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 168 | syn match dExtern "\<extern\s*([_a-zA-Z][_a-zA-Z0-9\+]*\>"he=s+6 contains=dExternIdentifier |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 169 | |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 170 | " Make import a region to prevent highlighting keywords |
| 171 | syn region dImport start="import" end=";" contains=dExternal,@dComment |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 172 | |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 173 | " Make module a region to prevent highlighting keywords |
| 174 | syn region dImport start="module" end=";" contains=dExternal,@dComment |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 175 | |
Bram Moolenaar | 9db9d9c | 2010-01-16 14:29:14 +0100 | [diff] [blame] | 176 | " dTokens is used by the token string highlighting |
| 177 | syn cluster dTokens contains=dExternal,dConditional,dBranch,dRepeat,dBoolean |
| 178 | syn cluster dTokens add=dConstant,dTypedef,dStructure,dOperator,dOpOverload |
| 179 | syn cluster dTokens add=dType,dDebug,dExceptions,dScopeDecl,dStatement |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 180 | syn cluster dTokens add=dStorageClass,dPragma,dAssert,dAnnotation,dEnum |
Bram Moolenaar | 9db9d9c | 2010-01-16 14:29:14 +0100 | [diff] [blame] | 181 | |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 182 | " Create a match for parameter lists to identify storage class |
| 183 | syn region paramlist start="(" end=")" contains=@dTokens |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 184 | |
| 185 | " Labels |
| 186 | " |
| 187 | " We contain dScopeDecl so public: private: etc. are not highlighted like labels |
Bram Moolenaar | 9db9d9c | 2010-01-16 14:29:14 +0100 | [diff] [blame] | 188 | syn match dUserLabel "^\s*[_$a-zA-Z][_$a-zA-Z0-9_]*\s*:"he=e-1 contains=dLabel,dScopeDecl,dEnum |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 189 | syn keyword dLabel case default |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 190 | |
Bram Moolenaar | 9db9d9c | 2010-01-16 14:29:14 +0100 | [diff] [blame] | 191 | syn cluster dTokens add=dUserLabel,dLabel |
| 192 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 193 | " Comments |
| 194 | " |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 195 | syn keyword dTodo contained TODO FIXME TEMP REFACTOR REVIEW HACK BUG XXX |
Bram Moolenaar | 21cf823 | 2004-07-16 20:18:37 +0000 | [diff] [blame] | 196 | syn match dCommentStar contained "^\s*\*[^/]"me=e-1 |
| 197 | syn match dCommentStar contained "^\s*\*$" |
| 198 | syn match dCommentPlus contained "^\s*+[^/]"me=e-1 |
| 199 | syn match dCommentPlus contained "^\s*+$" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 200 | if exists("d_comment_strings") |
Bram Moolenaar | 21cf823 | 2004-07-16 20:18:37 +0000 | [diff] [blame] | 201 | syn region dBlockCommentString contained start=+"+ end=+"+ end=+\*/+me=s-1,he=s-1 contains=dCommentStar,dUnicode,dEscSequence,@Spell |
| 202 | syn region dNestedCommentString contained start=+"+ end=+"+ end="+"me=s-1,he=s-1 contains=dCommentPlus,dUnicode,dEscSequence,@Spell |
| 203 | syn region dLineCommentString contained start=+"+ end=+$\|"+ contains=dUnicode,dEscSequence,@Spell |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 204 | syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell fold |
| 205 | syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell fold |
Bram Moolenaar | 21cf823 | 2004-07-16 20:18:37 +0000 | [diff] [blame] | 206 | syn match dLineComment "//.*" contains=dLineCommentString,dTodo,@Spell |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 207 | else |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 208 | syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell fold |
| 209 | syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell fold |
Bram Moolenaar | 21cf823 | 2004-07-16 20:18:37 +0000 | [diff] [blame] | 210 | syn match dLineComment "//.*" contains=dLineCommentString,dTodo,@Spell |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 211 | endif |
| 212 | |
Bram Moolenaar | 21cf823 | 2004-07-16 20:18:37 +0000 | [diff] [blame] | 213 | hi link dLineCommentString dBlockCommentString |
| 214 | hi link dBlockCommentString dString |
| 215 | hi link dNestedCommentString dString |
| 216 | hi link dCommentStar dBlockComment |
| 217 | hi link dCommentPlus dNestedComment |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 218 | |
Bram Moolenaar | 9db9d9c | 2010-01-16 14:29:14 +0100 | [diff] [blame] | 219 | syn cluster dTokens add=dBlockComment,dNestedComment,dLineComment |
| 220 | |
Bram Moolenaar | 5baddf0 | 2006-03-12 21:53:56 +0000 | [diff] [blame] | 221 | " /+ +/ style comments and strings that span multiple lines can cause |
| 222 | " problems. To play it safe, set minlines to a large number. |
| 223 | syn sync minlines=200 |
| 224 | " Use ccomment for /* */ style comments |
| 225 | syn sync ccomment dBlockComment |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 226 | |
| 227 | " Characters |
| 228 | " |
| 229 | syn match dSpecialCharError contained "[^']" |
| 230 | |
Bram Moolenaar | cd71fa3 | 2005-03-11 22:46:48 +0000 | [diff] [blame] | 231 | " Escape sequences (oct,specal char,hex,wchar, character entities \&xxx;) |
Bram Moolenaar | 9db9d9c | 2010-01-16 14:29:14 +0100 | [diff] [blame] | 232 | " These are not contained because they are considered string literals. |
Bram Moolenaar | 21cf823 | 2004-07-16 20:18:37 +0000 | [diff] [blame] | 233 | syn match dEscSequence "\\\(\o\{1,3}\|[\"\\'\\?ntbrfva]\|u\x\{4}\|U\x\{8}\|x\x\x\)" |
Bram Moolenaar | 9db9d9c | 2010-01-16 14:29:14 +0100 | [diff] [blame] | 234 | syn match dEscSequence "\\&[^;& \t]\+;" |
Bram Moolenaar | 21cf823 | 2004-07-16 20:18:37 +0000 | [diff] [blame] | 235 | syn match dCharacter "'[^']*'" contains=dEscSequence,dSpecialCharError |
| 236 | syn match dCharacter "'\\''" contains=dEscSequence |
| 237 | syn match dCharacter "'[^\\]'" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 238 | |
Bram Moolenaar | 9db9d9c | 2010-01-16 14:29:14 +0100 | [diff] [blame] | 239 | syn cluster dTokens add=dEscSequence,dCharacter |
| 240 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 241 | " Unicode characters |
| 242 | " |
Bram Moolenaar | 21cf823 | 2004-07-16 20:18:37 +0000 | [diff] [blame] | 243 | syn match dUnicode "\\u\d\{4\}" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 244 | |
| 245 | " String. |
| 246 | " |
Bram Moolenaar | 9db9d9c | 2010-01-16 14:29:14 +0100 | [diff] [blame] | 247 | syn region dString start=+"+ end=+"[cwd]\=+ skip=+\\\\\|\\"+ contains=dEscSequence,@Spell |
| 248 | syn region dRawString start=+`+ end=+`[cwd]\=+ contains=@Spell |
| 249 | syn region dRawString start=+r"+ end=+"[cwd]\=+ contains=@Spell |
| 250 | syn region dHexString start=+x"+ end=+"[cwd]\=+ contains=@Spell |
| 251 | syn region dDelimString start=+q"\z(.\)+ end=+\z1"+ contains=@Spell |
| 252 | syn region dHereString start=+q"\z(\I\i*\)\n+ end=+\n\z1"+ contains=@Spell |
| 253 | |
| 254 | " Nesting delimited string contents |
| 255 | " |
| 256 | syn region dNestParenString start=+(+ end=+)+ contained transparent contains=dNestParenString,@Spell |
| 257 | syn region dNestBrackString start=+\[+ end=+\]+ contained transparent contains=dNestBrackString,@Spell |
| 258 | syn region dNestAngleString start=+<+ end=+>+ contained transparent contains=dNestAngleString,@Spell |
| 259 | syn region dNestCurlyString start=+{+ end=+}+ contained transparent contains=dNestCurlyString,@Spell |
| 260 | |
| 261 | " Nesting delimited strings |
| 262 | " |
| 263 | syn region dParenString matchgroup=dParenString start=+q"(+ end=+)"+ contains=dNestParenString,@Spell |
| 264 | syn region dBrackString matchgroup=dBrackString start=+q"\[+ end=+\]"+ contains=dNestBrackString,@Spell |
| 265 | syn region dAngleString matchgroup=dAngleString start=+q"<+ end=+>"+ contains=dNestAngleString,@Spell |
| 266 | syn region dCurlyString matchgroup=dCurlyString start=+q"{+ end=+}"+ contains=dNestCurlyString,@Spell |
| 267 | |
| 268 | hi link dParenString dNestString |
| 269 | hi link dBrackString dNestString |
| 270 | hi link dAngleString dNestString |
| 271 | hi link dCurlyString dNestString |
| 272 | |
| 273 | syn cluster dTokens add=dString,dRawString,dHexString,dDelimString,dNestString |
| 274 | |
| 275 | " Token strings |
| 276 | " |
| 277 | syn region dNestTokenString start=+{+ end=+}+ contained contains=dNestTokenString,@dTokens |
| 278 | syn region dTokenString matchgroup=dTokenStringBrack transparent start=+q{+ end=+}+ contains=dNestTokenString,@dTokens |
| 279 | |
| 280 | syn cluster dTokens add=dTokenString |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 281 | |
| 282 | " Numbers |
| 283 | " |
| 284 | syn case ignore |
Bram Moolenaar | 5baddf0 | 2006-03-12 21:53:56 +0000 | [diff] [blame] | 285 | |
| 286 | syn match dDec display "\<\d[0-9_]*\(u\=l\=\|l\=u\=\)\>" |
| 287 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 288 | " Hex number |
Bram Moolenaar | 21cf823 | 2004-07-16 20:18:37 +0000 | [diff] [blame] | 289 | syn match dHex display "\<0x[0-9a-f_]\+\(u\=l\=\|l\=u\=\)\>" |
Bram Moolenaar | 5baddf0 | 2006-03-12 21:53:56 +0000 | [diff] [blame] | 290 | |
| 291 | syn match dOctal display "\<0[0-7_]\+\(u\=l\=\|l\=u\=\)\>" |
| 292 | " flag an octal number with wrong digits |
| 293 | syn match dOctalError display "\<0[0-7_]*[89][0-9_]*" |
| 294 | |
| 295 | " binary numbers |
| 296 | syn match dBinary display "\<0b[01_]\+\(u\=l\=\|l\=u\=\)\>" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 297 | |
| 298 | "floating point without the dot |
Bram Moolenaar | 21cf823 | 2004-07-16 20:18:37 +0000 | [diff] [blame] | 299 | syn match dFloat display "\<\d[0-9_]*\(fi\=\|l\=i\)\>" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 300 | "floating point number, with dot, optional exponent |
Bram Moolenaar | 21cf823 | 2004-07-16 20:18:37 +0000 | [diff] [blame] | 301 | syn match dFloat display "\<\d[0-9_]*\.[0-9_]*\(e[-+]\=[0-9_]\+\)\=[fl]\=i\=" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 302 | "floating point number, starting with a dot, optional exponent |
Bram Moolenaar | 21cf823 | 2004-07-16 20:18:37 +0000 | [diff] [blame] | 303 | syn match dFloat display "\(\.[0-9_]\+\)\(e[-+]\=[0-9_]\+\)\=[fl]\=i\=\>" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 304 | "floating point number, without dot, with exponent |
Bram Moolenaar | 21cf823 | 2004-07-16 20:18:37 +0000 | [diff] [blame] | 305 | "syn match dFloat display "\<\d\+e[-+]\=\d\+[fl]\=\>" |
| 306 | syn match dFloat display "\<\d[0-9_]*e[-+]\=[0-9_]\+[fl]\=\>" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 307 | |
| 308 | "floating point without the dot |
Bram Moolenaar | 5baddf0 | 2006-03-12 21:53:56 +0000 | [diff] [blame] | 309 | syn match dHexFloat display "\<0x[0-9a-f_]\+\(fi\=\|l\=i\)\>" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 310 | "floating point number, with dot, optional exponent |
Bram Moolenaar | 5baddf0 | 2006-03-12 21:53:56 +0000 | [diff] [blame] | 311 | syn match dHexFloat display "\<0x[0-9a-f_]\+\.[0-9a-f_]*\(p[-+]\=[0-9_]\+\)\=[fl]\=i\=" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 312 | "floating point number, without dot, with exponent |
Bram Moolenaar | 5baddf0 | 2006-03-12 21:53:56 +0000 | [diff] [blame] | 313 | syn match dHexFloat display "\<0x[0-9a-f_]\+p[-+]\=[0-9_]\+[fl]\=i\=\>" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 314 | |
Bram Moolenaar | 9db9d9c | 2010-01-16 14:29:14 +0100 | [diff] [blame] | 315 | syn cluster dTokens add=dDec,dHex,dOctal,dOctalError,dBinary,dFloat,dHexFloat |
| 316 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 317 | syn case match |
| 318 | |
| 319 | " Pragma (preprocessor) support |
| 320 | " TODO: Highlight following Integer and optional Filespec. |
| 321 | syn region dPragma start="#\s*\(line\>\)" skip="\\$" end="$" |
| 322 | |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 323 | " Block |
| 324 | " |
| 325 | syn region dBlock start="{" end="}" transparent fold |
| 326 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 327 | |
| 328 | " The default highlighting. |
| 329 | " |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 330 | hi def link dBinary Number |
| 331 | hi def link dDec Number |
| 332 | hi def link dHex Number |
| 333 | hi def link dOctal Number |
| 334 | hi def link dFloat Float |
| 335 | hi def link dHexFloat Float |
| 336 | hi def link dDebug Debug |
| 337 | hi def link dBranch Conditional |
| 338 | hi def link dConditional Conditional |
| 339 | hi def link dLabel Label |
| 340 | hi def link dUserLabel Label |
| 341 | hi def link dRepeat Repeat |
| 342 | hi def link dExceptions Exception |
| 343 | hi def link dAssert Statement |
| 344 | hi def link dStatement Statement |
| 345 | hi def link dScopeDecl dStorageClass |
| 346 | hi def link dStorageClass StorageClass |
| 347 | hi def link dBoolean Boolean |
| 348 | hi def link dUnicode Special |
| 349 | hi def link dTokenStringBrack String |
| 350 | hi def link dHereString String |
| 351 | hi def link dNestString String |
| 352 | hi def link dDelimString String |
| 353 | hi def link dRawString String |
| 354 | hi def link dString String |
| 355 | hi def link dHexString String |
| 356 | hi def link dCharacter Character |
| 357 | hi def link dEscSequence SpecialChar |
| 358 | hi def link dSpecialCharError Error |
| 359 | hi def link dOctalError Error |
| 360 | hi def link dOperator Operator |
| 361 | hi def link dOpOverload Identifier |
| 362 | hi def link dConstant Constant |
| 363 | hi def link dTypedef Typedef |
| 364 | hi def link dEnum Structure |
| 365 | hi def link dStructure Structure |
| 366 | hi def link dTodo Todo |
| 367 | hi def link dType Type |
| 368 | hi def link dLineComment Comment |
| 369 | hi def link dBlockComment Comment |
| 370 | hi def link dNestedComment Comment |
| 371 | hi def link dExternal Include |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 372 | hi def link dAnnotation PreProc |
| 373 | hi def link dSharpBang PreProc |
| 374 | hi def link dAttribute StorageClass |
| 375 | hi def link dIdentifier Identifier |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 376 | hi def link dVersion dStatement |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 377 | hi def link dVersionIdentifier Identifier |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 378 | hi def link dScopeIdentifier Identifier |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 379 | hi def link dTraitsIdentifier Identifier |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 380 | hi def link dPragma PreProc |
| 381 | hi def link dPragmaIdentifier Identifier |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 382 | hi def link dExtern dExternal |
| 383 | hi def link dExternIdentifier Identifier |
Bram Moolenaar | 9db9d9c | 2010-01-16 14:29:14 +0100 | [diff] [blame] | 384 | |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 385 | " Marks contents of the asm statment body as special |
| 386 | |
| 387 | syn match dAsmStatement "\<asm\>" |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 388 | syn region dAsmBody start="asm[\n]*\s*{"hs=e+1 end="}"he=e-1 contains=dAsmStatement,dAsmOpCode,@dComment,DUserLabel |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 389 | |
| 390 | hi def link dAsmBody dUnicode |
| 391 | hi def link dAsmStatement dStatement |
| 392 | hi def link dAsmOpCode Identifier |
| 393 | |
Bram Moolenaar | 543b7ef | 2013-06-01 14:50:56 +0200 | [diff] [blame] | 394 | syn keyword dAsmOpCode contained aaa aad aam aas |
| 395 | syn keyword dAsmOpCode contained add addpd addps addsd |
| 396 | syn keyword dAsmOpCode contained and andnpd andnps andpd |
| 397 | syn keyword dAsmOpCode contained arpl bound bsf bsr |
| 398 | syn keyword dAsmOpCode contained bt btc btr bts |
| 399 | syn keyword dAsmOpCode contained call bswap andps addss |
| 400 | syn keyword dAsmOpCode contained cbw cdq clc cld |
| 401 | syn keyword dAsmOpCode contained cli clts cmc cmova |
| 402 | syn keyword dAsmOpCode contained cmovb cmovbe cmovc cmove |
| 403 | syn keyword dAsmOpCode contained cmovge cmovl cmovle cmovna |
| 404 | syn keyword dAsmOpCode contained cmovnae cmovg cmovae clflush |
| 405 | syn keyword dAsmOpCode contained cmovnb cmovnbe cmovnc cmovne |
| 406 | syn keyword dAsmOpCode contained cmovnge cmovnl cmovnle cmovno |
| 407 | syn keyword dAsmOpCode contained cmovns cmovnz cmovo cmovp |
| 408 | syn keyword dAsmOpCode contained cmovpo cmovs cmovz cmp |
| 409 | syn keyword dAsmOpCode contained cmppd cmovpe cmovnp cmovng |
| 410 | syn keyword dAsmOpCode contained cmpps cmps cmpsb cmpsd |
| 411 | syn keyword dAsmOpCode contained cmpsw cmpxch8b cmpxchg comisd |
| 412 | syn keyword dAsmOpCode contained cpuid cvtdq2pd cvtdq2ps cvtpd2dq |
| 413 | syn keyword dAsmOpCode contained cvtpd2ps cvtpi2pd cvtpi2ps cvtps2dq |
| 414 | syn keyword dAsmOpCode contained cvtps2pd cvtpd2pi comiss cmpss |
| 415 | syn keyword dAsmOpCode contained cvtps2pi cvtsd2si cvtsd2ss cvtsi2sd |
| 416 | syn keyword dAsmOpCode contained cvtss2sd cvtss2si cvttpd2dq cvttpd2pi |
| 417 | syn keyword dAsmOpCode contained cvttps2pi cvttsd2si cvttss2si cwd |
| 418 | syn keyword dAsmOpCode contained da daa das db |
| 419 | syn keyword dAsmOpCode contained dd cwde cvttps2dq cvtsi2ss |
| 420 | syn keyword dAsmOpCode contained de dec df di |
| 421 | syn keyword dAsmOpCode contained divpd divps divsd divss |
| 422 | syn keyword dAsmOpCode contained dq ds dt dw |
| 423 | syn keyword dAsmOpCode contained enter f2xm1 fabs fadd |
| 424 | syn keyword dAsmOpCode contained faddp emms dl div |
| 425 | syn keyword dAsmOpCode contained fbld fbstp fchs fclex |
| 426 | syn keyword dAsmOpCode contained fcmovbe fcmove fcmovnb fcmovnbe |
| 427 | syn keyword dAsmOpCode contained fcmovnu fcmovu fcom fcomi |
| 428 | syn keyword dAsmOpCode contained fcomp fcompp fcos fdecstp |
| 429 | syn keyword dAsmOpCode contained fdisi fcomip fcmovne fcmovb |
| 430 | syn keyword dAsmOpCode contained fdiv fdivp fdivr fdivrp |
| 431 | syn keyword dAsmOpCode contained ffree fiadd ficom ficomp |
| 432 | syn keyword dAsmOpCode contained fidivr fild fimul fincstp |
| 433 | syn keyword dAsmOpCode contained fist fistp fisub fisubr |
| 434 | syn keyword dAsmOpCode contained fld finit fidiv feni |
| 435 | syn keyword dAsmOpCode contained fld1 fldcw fldenv fldl2e |
| 436 | syn keyword dAsmOpCode contained fldlg2 fldln2 fldpi fldz |
| 437 | syn keyword dAsmOpCode contained fmulp fnclex fndisi fneni |
| 438 | syn keyword dAsmOpCode contained fnop fnsave fnstcw fnstenv |
| 439 | syn keyword dAsmOpCode contained fnstsw fninit fmul fldl2t |
| 440 | syn keyword dAsmOpCode contained fpatan fprem fprem1 fptan |
| 441 | syn keyword dAsmOpCode contained frstor fsave fscale fsetpm |
| 442 | syn keyword dAsmOpCode contained fsincos fsqrt fst fstcw |
| 443 | syn keyword dAsmOpCode contained fstp fstsw fsub fsubp |
| 444 | syn keyword dAsmOpCode contained fsubr fstenv fsin frndint |
| 445 | syn keyword dAsmOpCode contained fsubrp ftst fucom fucomi |
| 446 | syn keyword dAsmOpCode contained fucomp fucompp fwait fxam |
| 447 | syn keyword dAsmOpCode contained fxrstor fxsave fxtract fyl2x |
| 448 | syn keyword dAsmOpCode contained hlt idiv imul in |
| 449 | syn keyword dAsmOpCode contained inc fyl2xp1 fxch fucomip |
| 450 | syn keyword dAsmOpCode contained ins insb insd insw |
| 451 | syn keyword dAsmOpCode contained into invd invlpg iret |
| 452 | syn keyword dAsmOpCode contained ja jae jb jbe |
| 453 | syn keyword dAsmOpCode contained jcxz je jecxz jg |
| 454 | syn keyword dAsmOpCode contained jge jc iretd int |
| 455 | syn keyword dAsmOpCode contained jl jle jmp jna |
| 456 | syn keyword dAsmOpCode contained jnb jnbe jnc jne |
| 457 | syn keyword dAsmOpCode contained jnge jnl jnle jno |
| 458 | syn keyword dAsmOpCode contained jns jnz jo jp |
| 459 | syn keyword dAsmOpCode contained jpe jnp jng jnae |
| 460 | syn keyword dAsmOpCode contained jpo js jz lahf |
| 461 | syn keyword dAsmOpCode contained ldmxcsr lds lea leave |
| 462 | syn keyword dAsmOpCode contained lfence lfs lgdt lgs |
| 463 | syn keyword dAsmOpCode contained lldt lmsw lock lods |
| 464 | syn keyword dAsmOpCode contained lodsb lidt les lar |
| 465 | syn keyword dAsmOpCode contained lodsd lodsw loop loope |
| 466 | syn keyword dAsmOpCode contained loopnz loopz lsl lss |
| 467 | syn keyword dAsmOpCode contained maskmovdqu maskmovq maxpd maxps |
| 468 | syn keyword dAsmOpCode contained maxss mfence minpd minps |
| 469 | syn keyword dAsmOpCode contained minsd maxsd ltr loopne |
| 470 | syn keyword dAsmOpCode contained minss mov movapd movaps |
| 471 | syn keyword dAsmOpCode contained movdq2q movdqa movdqu movhlps |
| 472 | syn keyword dAsmOpCode contained movhps movlhps movlpd movlps |
| 473 | syn keyword dAsmOpCode contained movmskps movntdq movnti movntpd |
| 474 | syn keyword dAsmOpCode contained movntps movmskpd movhpd movd |
| 475 | syn keyword dAsmOpCode contained movntq movq movq2dq movs |
| 476 | syn keyword dAsmOpCode contained movsd movss movsw movsx |
| 477 | syn keyword dAsmOpCode contained movups movzx mul mulpd |
| 478 | syn keyword dAsmOpCode contained mulsd mulss neg nop |
| 479 | syn keyword dAsmOpCode contained not mulps movupd movsb |
| 480 | syn keyword dAsmOpCode contained or orpd orps out |
| 481 | syn keyword dAsmOpCode contained outsb outsd outsw packssdw |
| 482 | syn keyword dAsmOpCode contained packuswb paddb paddd paddq |
| 483 | syn keyword dAsmOpCode contained paddsw paddusb paddusw paddw |
| 484 | syn keyword dAsmOpCode contained pand paddsb packsswb outs |
| 485 | syn keyword dAsmOpCode contained pandn pavgb pavgw pcmpeqb |
| 486 | syn keyword dAsmOpCode contained pcmpeqw pcmpgtb pcmpgtd pcmpgtw |
| 487 | syn keyword dAsmOpCode contained pinsrw pmaddwd pmaxsw pmaxub |
| 488 | syn keyword dAsmOpCode contained pminub pmovmskb pmulhuw pmulhw |
| 489 | syn keyword dAsmOpCode contained pmullw pminsw pextrw pcmpeqd |
| 490 | syn keyword dAsmOpCode contained pmuludq pop popa popad |
| 491 | syn keyword dAsmOpCode contained popfd por prefetchnta prefetcht0 |
| 492 | syn keyword dAsmOpCode contained prefetcht2 psadbw pshufd pshufhw |
| 493 | syn keyword dAsmOpCode contained pshufw pslld pslldq psllq |
| 494 | syn keyword dAsmOpCode contained psllw pshuflw prefetcht1 popf |
| 495 | syn keyword dAsmOpCode contained psrad psraw psrld psrldq |
| 496 | syn keyword dAsmOpCode contained psrlw psubb psubd psubq |
| 497 | syn keyword dAsmOpCode contained psubsw psubusb psubusw psubw |
| 498 | syn keyword dAsmOpCode contained punpckhdq punpckhqdq punpckhwd punpcklbw |
| 499 | syn keyword dAsmOpCode contained punpckldq punpckhbw psubsb psrlq |
| 500 | syn keyword dAsmOpCode contained punpcklqdq punpcklwd push pusha |
| 501 | syn keyword dAsmOpCode contained pushf pushfd pxor rcl |
| 502 | syn keyword dAsmOpCode contained rcpss rcr rdmsr rdpmc |
| 503 | syn keyword dAsmOpCode contained rep repe repne repnz |
| 504 | syn keyword dAsmOpCode contained repz rdtsc rcpps pushad |
| 505 | syn keyword dAsmOpCode contained ret retf rol ror |
| 506 | syn keyword dAsmOpCode contained rsqrtps rsqrtss sahf sal |
| 507 | syn keyword dAsmOpCode contained sbb scas scasb scasd |
| 508 | syn keyword dAsmOpCode contained seta setae setb setbe |
| 509 | syn keyword dAsmOpCode contained setc scasw sar rsm |
| 510 | syn keyword dAsmOpCode contained sete setg setge setl |
| 511 | syn keyword dAsmOpCode contained setna setnae setnb setnbe |
| 512 | syn keyword dAsmOpCode contained setne setng setnge setnl |
| 513 | syn keyword dAsmOpCode contained setno setnp setns setnz |
| 514 | syn keyword dAsmOpCode contained seto setnle setnc setle |
| 515 | syn keyword dAsmOpCode contained setp setpe setpo sets |
| 516 | syn keyword dAsmOpCode contained sfence sgdt shl shld |
| 517 | syn keyword dAsmOpCode contained shrd shufpd shufps sidt |
| 518 | syn keyword dAsmOpCode contained smsw sqrtpd sqrtps sqrtsd |
| 519 | syn keyword dAsmOpCode contained sqrtss sldt shr setz |
| 520 | syn keyword dAsmOpCode contained stc std sti stmxcsr |
| 521 | syn keyword dAsmOpCode contained stosb stosd stosw str |
| 522 | syn keyword dAsmOpCode contained subpd subps subsd subss |
| 523 | syn keyword dAsmOpCode contained sysexit test ucomisd ucomiss |
| 524 | syn keyword dAsmOpCode contained ud2 sysenter sub stos |
| 525 | syn keyword dAsmOpCode contained unpckhpd unpckhps unpcklpd unpcklps |
| 526 | syn keyword dAsmOpCode contained verw wbinvd wrmsr xadd |
| 527 | syn keyword dAsmOpCode contained xchg xlatb xor xorpd |
| 528 | syn keyword dAsmOpCode contained xorps pfrcpit1 pfmin movddup |
| 529 | syn keyword dAsmOpCode contained addsubpd addsubps fisttp haddps |
| 530 | syn keyword dAsmOpCode contained hsubpd hsubps lddqu monitor |
| 531 | syn keyword dAsmOpCode contained haddpd xlat wait verr |
| 532 | syn keyword dAsmOpCode contained movshdup movsldup mwait pfcmpeq |
| 533 | syn keyword dAsmOpCode contained pavgusb pf2id pfacc pfadd |
| 534 | syn keyword dAsmOpCode contained pfcmpge pfcmpgt pfmax pfmul |
| 535 | syn keyword dAsmOpCode contained pfnacc pfpnacc pfrcp pfrcpit1 |
| 536 | syn keyword dAsmOpCode contained pfrsqit1 pfrsqrt pfsub pfsubr |
| 537 | syn keyword dAsmOpCode contained pmulhrw pswapd syscall sysret |
| 538 | syn keyword dAsmOpCode contained vpmuldq xgetbv cmpxchg8b cmpxchg16b |
| 539 | syn keyword dAsmOpCode contained pabsb pabsd pabsw palignr |
| 540 | syn keyword dAsmOpCode contained phaddd phaddsw phaddw phsubd |
| 541 | syn keyword dAsmOpCode contained phsubsw phsubw pmaddubsw pmulhrsw |
| 542 | syn keyword dAsmOpCode contained pshufb psignb psignd psignw |
| 543 | syn keyword dAsmOpCode contained popfq pushfq blendpd blendps |
| 544 | syn keyword dAsmOpCode contained blendvpd blendvps extractps insertps |
| 545 | syn keyword dAsmOpCode contained movntdqa mpsadbw packusdw pblendvb |
| 546 | syn keyword dAsmOpCode contained pblendw pcmpeqq pextrb pextrd |
| 547 | syn keyword dAsmOpCode contained pextrq phminposuw pinsrb pinsrd |
| 548 | syn keyword dAsmOpCode contained pinsrq pmaxsb pmaxsd pmaxud |
| 549 | syn keyword dAsmOpCode contained pmaxuw pminsb pminsd pminud |
| 550 | syn keyword dAsmOpCode contained pminuw pmulld ptest roundpd |
| 551 | syn keyword dAsmOpCode contained roundps roundsd roundss pmuldq |
| 552 | syn keyword dAsmOpCode contained pmovsxbd pmovsxdq pmovzxbq pmovzxdq |
| 553 | syn keyword dAsmOpCode contained pmovsxbq pmovsxwd pmovzxbq pmovzxwd |
| 554 | syn keyword dAsmOpCode contained pmovsxbw pmovsxwq pmovzxbw pmovzxwq |
| 555 | syn keyword dAsmOpCode contained crc32 pcmpestri pcmpestrm pcmpgtq |
| 556 | syn keyword dAsmOpCode contained pcmpistri pcmpistrm popcnt pi2fd |
| 557 | syn keyword dAsmOpCode contained adc |
Bram Moolenaar | 24ea3ba | 2010-09-19 19:01:21 +0200 | [diff] [blame] | 558 | |
Bram Moolenaar | 6be7f87 | 2012-01-20 21:08:56 +0100 | [diff] [blame] | 559 | let &cpo = s:cpo_save |
| 560 | unlet s:cpo_save |