mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 13:06:30 +00:00
71 lines
1.6 KiB
VimL
71 lines
1.6 KiB
VimL
" Vim syntax file
|
|
" Language: Slige
|
|
" Maintainer: SFJ
|
|
" Latest Revision: 1 January 1984
|
|
|
|
if exists("b:current_syntax")
|
|
finish
|
|
endif
|
|
|
|
|
|
syn keyword Keyword break return let fn loop if else struct import or and not while for in mod pub
|
|
syn keyword Special null
|
|
syn keyword Type int string bool
|
|
syn keyword Boolean true false
|
|
|
|
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 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 '0'
|
|
syn match Number '[1-9][0-9]*'
|
|
syn match Number '0[0-7]\+'
|
|
syn match Number '0x[0-9a-fA-F]\+'
|
|
syn match Number '0b[01]\+'
|
|
|
|
syn match Character "'[^\\]'"
|
|
syn match Character "'\\.'"
|
|
|
|
syn region String start=+"+ skip=+\\"+ end=+"+
|
|
|
|
syn keyword Todo contained TODO FIXME XXX NOTE
|
|
syn match Comment "//.*$" contains=Todo
|
|
|
|
syn region Comment start=+/\*+ end=+\*/+ contains=Todo
|
|
|
|
|
|
syn match Identifier '[a-z_]\w*'
|
|
syn match Type '[A-Z]\w*'
|
|
|
|
|
|
syn match Function '[a-zA-Z_]\w*\ze\s\{-}(.\{-})'
|
|
|
|
syn match sligePath '[a-zA-Z_]\w*\ze\s\{-}::'
|
|
syn match Function '[a-zA-Z_]\w*\ze\s\{-}::<.\{-}>'
|
|
|
|
syn match Function ' \zs[a-zA-Z_]\w*\ze\s\{-}<.\{-}>\s\{-}(.\{-})'
|
|
|
|
syn region sligeBlock start="{" end="}" transparent fold
|
|
|
|
syn region sligeAnno start="#!\?\[" end="]" contains=Identifier,Type
|
|
|
|
hi def link sligeAnno PreProc
|
|
hi def link sligePath Include
|
|
|
|
let b:current_syntax = "slige"
|