From 14b3d007d3309618b83e9e6c3b483298075a0f11 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Thu, 10 Apr 2025 12:19:13 +0100 Subject: [PATCH] mie.vim: add highlighting for new instructions and keywords --- mie.vim/syntax/mie.vim | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mie.vim/syntax/mie.vim b/mie.vim/syntax/mie.vim index 5b8c789..b37533f 100755 --- a/mie.vim/syntax/mie.vim +++ b/mie.vim/syntax/mie.vim @@ -5,22 +5,24 @@ endif let s:save_cpo = &cpoptions set cpoptions&vim -syn keyword mieUnspecifiedStatement record data define +syn keyword mieUnspecifiedStatement record data define type global syn keyword mieInstruction \ alloca load store call br cmp \ c.z c.nz c.eq c.ne c.lt c.le c.gt c.ge \ br br.t br.f \ add sub div mul push pop msg + \ getelementptr switch ret syn match mieRegister "%[0-9]\>" syn match mieRegister "%[1-9][0-9]\+\>" syn match mieRegister "%\w\+\>" syn match mieIdentifier /@\(\w\+\)\(\.\(\w\+\)\)*\>/ syn match mieIdentifier /@\.\(\w\+\)\(\.\(\w\+\)\)*\>/ syn match mieLabel /\(\w\+\)\(\.\(\w\+\)\)*\:/ -syn keyword mieType id ptr str label void +syn keyword mieType id ptr str sym 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 +syn keyword mieBlockType lambda instance static class syn match mieFieldIndex /#[0-9]\+:\>/ syn match mieFieldIndex /#-[0-9]\+:\>/ @@ -66,6 +68,7 @@ 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 @@ -75,7 +78,7 @@ hi def link mieLineContinuation mieComment hi def link mieIdent @variable.builtin hi def link mieAtom Constant -let b:current_syntax = 'mie" +let b:current_syntax = 'mie' let &cpoptions = s:save_cpo unlet s:save_cpo