Files
wasmtime/misc/vim/syntax/cton.vim
Jakob Stoklund Olesen 91d919c11a Track stack slot kinds.
Add a StackSlotKind enumeration to help keep track of the different
kinds of stack slots supported:

- Incoming and outgoing function arguments on the stack.
- Spill slots and locals.

Change the text format syntax for declaring a stack slot to use a kind
keyword rather than just 'stack_slot'.
2017-06-16 11:01:22 -07:00

43 lines
1.3 KiB
VimL

" Vim syntax file
" Language: Cretonne
" Maintainer: Jakob Stoklund Olesen <stoklund@2pi.dk
" Last Change: Jun 16, 2017
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" Disable spell checking even in comments.
" They tend to refer to weird stuff like assembler mnemonics anyway.
syn spell notoplevel
syn keyword ctonHeader test isa set
syn keyword ctonDecl function jump_table incoming_arg outgoing_arg spill_slot local
syn keyword ctonFilecheck check sameln nextln unordered not regex contained
syn match ctonType /\<[bif]\d\+\(x\d\+\)\?\>/
syn match ctonEntity /\<\(v\|ss\|jt\|fn\|sig\)\d\+\>/
syn match ctonLabel /\<ebb\d+\>/
syn match ctonName /%\w\+\>/
syn match ctonNumber /-\?\<\d\+\>/
syn match ctonNumber /-\?\<0x\x\+\(\.\x*\)\(p[+-]\?\d\+\)\?\>/
syn match ctonHexSeq /#\x\+\>/
syn region ctonCommentLine start=";" end="$" contains=ctonFilecheck
hi def link ctonHeader Keyword
hi def link ctonDecl Keyword
hi def link ctonType Type
hi def link ctonEntity Identifier
hi def link ctonLabel Label
hi def link ctonName String
hi def link ctonNumber Number
hi def link ctonHexSeq Number
hi def link ctonCommentLine Comment
hi def link ctonFilecheck SpecialComment
let b:current_syntax = "cton"