robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
ab20681c52
master
1" Vim syntax file 2" Language: TI linear assembly language 3" Document: https://downloads.ti.com/docs/esd/SPRUI03B/#SPRUI03B_HTML/assembler-description.html 4" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu> 5" Last Change: 2025 Jan 08 6 7if exists ( "b:current_syntax" ) 8finish 9endif 10 11syn case ignore 12 13" storage types 14syn match tiasmType "\.bits " 15syn match tiasmType "\.byte " 16syn match tiasmType "\.char " 17syn match tiasmType "\.cstring " 18syn match tiasmType "\.double " 19syn match tiasmType "\.field " 20syn match tiasmType "\.float " 21syn match tiasmType "\.half " 22syn match tiasmType "\.int " 23syn match tiasmType "\.long " 24syn match tiasmType "\.short " 25syn match tiasmType "\.string " 26syn match tiasmType "\.ubyte " 27syn match tiasmType "\.uchar " 28syn match tiasmType "\.uhalf " 29syn match tiasmType "\.uint " 30syn match tiasmType "\.ulong " 31syn match tiasmType "\.ushort " 32syn match tiasmType "\.uword " 33syn match tiasmType "\.word " 34 35syn match tiasmIdentifier "[ a-z_ ][ a-z0-9_ ] * " 36 37syn match tiasmDecimal "\< [ 1-9 ] \d * \> "display 38syn match tiasmOctal "\<0 [ 0-7 ][ 0-7 ] \+\>\|\< [ 0-7 ] \+ [ oO ] \> "display 39syn match tiasmHexadecimal "\<0 [ xX ][ 0-9a-fA-F ] \+\>\|\< [ 0-9 ][ 0-9a-fA-F ] * [ hH ] \> "display 40syn match tiasmBinary "\<0 [ bB ][ 0-1 ] \+\>\|\< [ 01 ] \+ [ bB ] \> "display 41 42syn match tiasmFloat "\<\d\+\.\d * \%(e [ +- ] \=\d\+\)\=\> "display 43syn match tiasmFloat "\<\d\%(e [ +- ] \=\d\+\)\> "display 44 45syn match tiasmCharacter "'.'\|''\|' [ ^' ] ' " 46 47syn region tiasmString start = "\" "end = "\" " skip="\"\"" 48 49syn match tiasmFunction "\$ [ a-zA-Z_ ][ a-zA-Z_0-9 ] * \ze( " 50 51syn keyword tiasmTodo contained TODO FIXME XXX NOTE 52syn region tiasmComment start = "; "end = "$ "keepend contains = tiasmTodo , @Spell 53syn match tiasmComment "^ [ *! ] . * "contains = tiasmTodo , @Spell 54syn match tiasmLabel "^ [ ^ *!; ][ ^ : ] * " 55 56syn match tiasmInclude "\.include " 57syn match tiasmCond "\.if " 58syn match tiasmCond "\.else " 59syn match tiasmCond "\.endif " 60syn match tiasmMacro "\.macro " 61syn match tiasmMacro "\.endm " 62 63syn match tiasmDirective "\. [ A-Za-z ][ 0-9A-Za-z-_ ] * " 64 65syn case match 66 67hi def link tiasmLabel Label 68hi def link tiasmComment Comment 69hi def link tiasmTodo Todo 70hi def link tiasmDirective Statement 71 72hi def link tiasmInclude Include 73hi def link tiasmCond PreCondit 74hi def link tiasmMacro Macro 75 76if exists ( 'g:tiasm_legacy_syntax_groups' ) 77hi def link hexNumber Number 78hi def link decNumber Number 79hi def link octNumber Number 80hi def link binNumber Number 81hi def link tiasmHexadecimal hexNumber 82hi def link tiasmDecimal decNumber 83hi def link tiasmOctal octNumber 84hi def link tiasmBinary binNumber 85else 86hi def link tiasmHexadecimal Number 87hi def link tiasmDecimal Number 88hi def link tiasmOctal Number 89hi def link tiasmBinary Number 90endif 91hi def link tiasmFloat Float 92 93hi def link tiasmString String 94hi def link tiasmStringEscape Special 95hi def link tiasmCharacter Character 96hi def link tiasmCharacterEscape Special 97 98hi def link tiasmIdentifier Identifier 99hi def link tiasmType Type 100hi def link tiasmFunction Function 101 102let b: current_syntax = "tiasm"