| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | |
| | if exists("b:current_syntax") |
| | finish |
| | endif |
| |
|
| | let s:cpo_save = &cpo |
| | set cpo&vim |
| |
|
| | syn case ignore |
| |
|
| | |
| | syn match asmType "\.long" |
| | syn match asmType "\.ascii" |
| | syn match asmType "\.asciz" |
| | syn match asmType "\.byte" |
| | syn match asmType "\.double" |
| | syn match asmType "\.float" |
| | syn match asmType "\.hword" |
| | syn match asmType "\.int" |
| | syn match asmType "\.octa" |
| | syn match asmType "\.quad" |
| | syn match asmType "\.short" |
| | syn match asmType "\.single" |
| | syn match asmType "\.space" |
| | syn match asmType "\.string" |
| | syn match asmType "\.word" |
| | syn match asmType "\.2byte" |
| | syn match asmType "\.4byte" |
| | syn match asmType "\.8byte" |
| |
|
| | syn match asmIdentifier "[a-z_][a-z0-9_]*" |
| | syn match asmLabel "[a-z_][a-z0-9_]*:"he=e-1 |
| |
|
| | |
| | |
| | |
| | |
| | syn match asmDecimal "\<0\+[1-7]\=\>" display |
| | syn match asmDecimal "\<[1-9]\d*\>" display |
| | syn match asmOctal "\<0[0-7][0-7]\+\>" display |
| | syn match asmHexadecimal "\<0[xX][0-9a-fA-F]\+\>" display |
| | syn match asmBinary "\<0[bB][0-1]\+\>" display |
| |
|
| | syn match asmFloat "\<\d\+\.\d*\%(e[+-]\=\d\+\)\=\>" display |
| | syn match asmFloat "\.\d\+\%(e[+-]\=\d\+\)\=\>" display |
| | syn match asmFloat "\<\d\%(e[+-]\=\d\+\)\>" display |
| | syn match asmFloat "[+-]\=Inf\>\|\<NaN\>" display |
| |
|
| | syn match asmFloat "\%(0[edfghprs]\)[+-]\=\d*\%(\.\d\+\)\%(e[+-]\=\d\+\)\=" display |
| | syn match asmFloat "\%(0[edfghprs]\)[+-]\=\d\+\%(\.\d\+\)\=\%(e[+-]\=\d\+\)\=" display |
| | |
| | syn match asmFloat "\%(0x\)[+-]\=\d*\%(\.\d\+\)\%(e[+-]\=\d\+\)\=" display |
| |
|
| | |
| | |
| | syn match asmCharacterEscape "\\." contained |
| | syn match asmCharacter "'\\\=." contains=asmCharacterEscape |
| |
|
| | syn match asmStringEscape "\\\_." contained |
| | syn match asmStringEscape "\\\%(\o\{3}\|00[89]\)" contained display |
| | syn match asmStringEscape "\\x\x\+" contained display |
| |
|
| | syn region asmString start="\"" end="\"" skip="\\\\\|\\\"" contains=asmStringEscape |
| |
|
| | syn keyword asmTodo contained TODO FIXME XXX NOTE |
| |
|
| | |
| | syn region asmComment start="/\*" end="\*/" contains=asmTodo,@Spell |
| |
|
| | |
| | |
| | " next line (hence the syntax region does not define 'skip="\\$ |
| | syn region asmComment start="//" end="$" keepend contains=asmTodo,@Spell |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | syn match asmComment "[#;!|].*" contains=asmTodo,@Spell |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | "syn match asmComment "@.* |
| | "syn match asmComment "^#.* |
| |
|
| | |
| | |
| |
|
| | syn match asmInclude "\.include" |
| | syn match asmCond "\.if" |
| | syn match asmCond "\.else" |
| | syn match asmCond "\.endif" |
| | syn match asmMacro "\.macro" |
| | syn match asmMacro "\.endm" |
| |
|
| | |
| | |
| | |
| | |
| | syn match asmDirective "\.[A-Za-z][0-9A-Za-z-_]*" |
| |
|
| | syn case match |
| |
|
| | |
| | |
| |
|
| | |
| | hi def link asmSection Special |
| | hi def link asmLabel Label |
| | hi def link asmComment Comment |
| | hi def link asmTodo Todo |
| | hi def link asmDirective Statement |
| |
|
| | hi def link asmInclude Include |
| | hi def link asmCond PreCondit |
| | hi def link asmMacro Macro |
| |
|
| | if exists('g:asm_legacy_syntax_groups') |
| | hi def link hexNumber Number |
| | hi def link decNumber Number |
| | hi def link octNumber Number |
| | hi def link binNumber Number |
| | hi def link asmHexadecimal hexNumber |
| | hi def link asmDecimal decNumber |
| | hi def link asmOctal octNumber |
| | hi def link asmBinary binNumber |
| | else |
| | hi def link asmHexadecimal Number |
| | hi def link asmDecimal Number |
| | hi def link asmOctal Number |
| | hi def link asmBinary Number |
| | endif |
| | hi def link asmFloat Float |
| |
|
| | hi def link asmString String |
| | hi def link asmStringEscape Special |
| | hi def link asmCharacter Character |
| | hi def link asmCharacterEscape Special |
| |
|
| | hi def link asmIdentifier Identifier |
| | hi def link asmType Type |
| |
|
| | let b:current_syntax = "asm" |
| |
|
| | let &cpo = s:cpo_save |
| | unlet s:cpo_save |
| |
|
| | |
| |
|