slige/editors/vim/syntax/slige.vim

66 lines
1.5 KiB
VimL
Raw Normal View History

2024-12-12 13:35:05 +01:00
" Vim syntax file
" Language: Slige
" Maintainer: SFJ
" Latest Revision: 1 January 1984
if exists("b:current_syntax")
finish
endif
2024-12-31 00:24:22 +01:00
syn keyword Keyword break return let fn loop if else struct import or and not while for in mod pub
2024-12-12 13:35:05 +01:00
syn keyword Special null
2024-12-13 20:05:27 +01:00
syn keyword Type int string bool
2024-12-12 13:35:05 +01:00
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 '-='
2024-12-12 13:35:05 +01:00
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 '->'
2024-12-13 10:14:36 +01:00
syn match Operator '::'
syn match Operator '::<'
2024-12-12 13:35:05 +01:00
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]\+'
2024-12-22 02:30:23 +01:00
syn match Character "'[^\\]'"
syn match Character "'\\.'"
2024-12-12 13:35:05 +01:00
syn region String start=+"+ skip=+\\"+ end=+"+
syn keyword Todo contained TODO FIXME XXX NOTE
syn match Comment "//.*$" contains=Todo
2024-12-12 13:44:12 +01:00
syn region Comment start=+/\*+ end=+\*/+ contains=Todo
2024-12-31 00:24:22 +01:00
2024-12-13 09:55:09 +01:00
syn match Identifier '[a-z_]\w*'
syn match Type '[A-Z]\w*'
syn match Function '[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\{-}(.\{-})'
2024-12-12 13:35:05 +01:00
syn region sligeBlock start="{" end="}" transparent fold
2024-12-31 00:24:22 +01:00
syn region sligeAnno start="#!\?\[" end="]" contains=Identifier,Type
hi def link sligeAnno PreProc
2024-12-12 13:35:05 +01:00
let b:current_syntax = "slige"