75 lines
2.3 KiB
VimL
75 lines
2.3 KiB
VimL
|
|
if exists('b:current_syntax')
|
||
|
|
finish
|
||
|
|
endif
|
||
|
|
|
||
|
|
let s:save_cpo = &cpoptions
|
||
|
|
set cpoptions&vim
|
||
|
|
|
||
|
|
setlocal iskeyword+=@-@
|
||
|
|
setlocal iskeyword+=.
|
||
|
|
syn keyword ivyasmUnspecifiedStatement @end @lambda @class @msgh @use @constpool @selector @ident
|
||
|
|
syn keyword ivyasmInstruction ldr str ret ret.n
|
||
|
|
syn match ivyasmRegister "x[0-9]"
|
||
|
|
syn match ivyasmRegister "x[1-9][0-9]"
|
||
|
|
syn keyword ivyasmIndexBase self bp sp
|
||
|
|
|
||
|
|
syn match ivyasmFieldIndex /#[0-9]\+:\>/
|
||
|
|
syn match ivyasmFieldIndex /#-[0-9]\+:\>/
|
||
|
|
syn match ivyasmFieldIndex /#0x[:xdigit:]\+:\>/
|
||
|
|
syn match ivyasmFieldIndex /#-0x[:xdigit:]\+:\>/
|
||
|
|
|
||
|
|
syn region ivyasmString matchgroup=ivyQuote start=+"+ end=+"\%(u8\)\=+ end=+$+ extend
|
||
|
|
|
||
|
|
syn match ivyasmInteger /#[0-9]\+\>/
|
||
|
|
syn match ivyasmInteger /#-[0-9]\+\>/
|
||
|
|
syn match ivyasmInteger /#0x[:xdigit:]\+\>/
|
||
|
|
syn match ivyasmInteger /#-0x[:xdigit:]\+\>/
|
||
|
|
|
||
|
|
syn match ivyasmPropertyName /\($\s*\)\@<=[a-zA-Z_][A-Za-z0-9_]*/
|
||
|
|
syn match ivyasmFieldName /\(#[0-9]\+:\s\)\@<=[a-zA-Z_][A-Za-z0-9_]*\>/
|
||
|
|
|
||
|
|
syn match ivyasmClassName /\(@msgh (\)\@<=\([A-Za-z_][A-Za-z0-9_]*\)\(.\([A-Za-z_][A-Za-z0-9_]*\)\)*\()\)\@=\>/
|
||
|
|
syn match ivyasmClassName /\(@class (\)\@<=\([A-Za-z_][A-Za-z0-9_]*\)\(.\([A-Za-z_][A-Za-z0-9_]*\)\)*\()\)\@=\>/
|
||
|
|
syn match ivyasmLambdaName /\(@lambda (\)\@<=\([A-Za-z_][A-Za-z0-9_]*\)\()\)\@=\>/
|
||
|
|
|
||
|
|
syn match ivyasmFieldIndex /#-[0-9]\+:\>/
|
||
|
|
syn match ivyasmFieldIndex /#0x[:xdigit:]\+:\>/
|
||
|
|
syn match ivyasmFieldIndex /#-0x[:xdigit:]\+:\>/
|
||
|
|
|
||
|
|
syn match ivyasmSelectorLabel /\<[a-z_]\([A-Za-z0-9_]*\)\:/
|
||
|
|
|
||
|
|
syn match ivyasmBrackets "[[\]]" display
|
||
|
|
syn match ivyasmParens "[()]" display
|
||
|
|
syn match ivyPropertySymbol "\$" display
|
||
|
|
|
||
|
|
" The default highlighting.
|
||
|
|
hi def link ivyasmUnspecifiedStatement Statement
|
||
|
|
hi def link ivyPropertySymbol Statement
|
||
|
|
|
||
|
|
hi def link ivyasmInteger Number
|
||
|
|
hi def link ivyasmFieldIndex Tag
|
||
|
|
|
||
|
|
hi def link ivyasmParens Delimiter
|
||
|
|
hi def link ivyasmBraces Structure
|
||
|
|
|
||
|
|
hi def link ivyasmPropertyName @property
|
||
|
|
hi def link ivyasmFieldName @variable.parameter
|
||
|
|
hi def link ivyasmClassName Type
|
||
|
|
hi def link ivyasmLambdaName @variable.parameter
|
||
|
|
|
||
|
|
hi def link ivyasmInstruction Identifier
|
||
|
|
hi def link ivyasmIndexBase @variable.builtin
|
||
|
|
hi def link ivyasmRegister Constant
|
||
|
|
|
||
|
|
hi def link ivyasmSelectorLabel Label
|
||
|
|
|
||
|
|
hi def link ivyasmString String
|
||
|
|
|
||
|
|
|
||
|
|
let b:current_syntax = 'ivyasm'
|
||
|
|
|
||
|
|
let &cpoptions = s:save_cpo
|
||
|
|
unlet s:save_cpo
|
||
|
|
|
||
|
|
" vim: vts=16,28;ech
|