stela/stela.vim

51 lines
1.3 KiB
VimL
Raw Permalink Normal View History

2024-07-18 13:44:39 +01:00
" Vim syntax file
" Language: STate machine Event LAnguage
" Maintainer: Simon
" Latest Revision: 17 July 2024
if exists("b:current_syntax")
finish
endif
syn keyword Keyword return if else
syn keyword Keyword enumeration derivable derives class public private
syn keyword Keyword operation attribute associate state_machine
syn keyword Keyword transition
syn keyword Special initial final entry exit
syn keyword Type void int float bool
syn keyword Boolean true false
syn keyword Identifier this
syn match Operator '-'
syn match Operator '->'
syn match Operator ':'
syn match Operator '::'
syn match Operator '='
syn match Operator '+'
syn match Operator '\*'
syn match Operator ';'
syn match Operator '\.'
syn match Operator ','
syn match Number '\d\+'
syn match Number '[-+]\d\+'
syn match Float '[-+]\d\+\.\d*'
syn match Float '[-+]\=\d[[:digit:]]*[eE][\-+]\=\d\+'
syn match Float '\d[[:digit:]]*[eE][\-+]\=\d\+'
syn match Float '[-+]\=\d[[:digit:]]*\.\d*[eE][\-+]\=\d\+'
syn match Float '\d[[:digit:]]*\.\d*[eE][\-+]\=\d\+'
syn region String start=+"+ skip=+\\"+ end=+"+
syn keyword Todo contained TODO FIXME XXX NOTE
syn match Comment "#.*$" contains=Todo
syn match Comment "//.*$" contains=Todo
syn match Function '[a-zA-Z_]\w*\ze('
syn region stelaBlock start="{" end="}" transparent fold
let b:current_syntax = "stela"