slige/editors/vim/syntax/slige.vim

71 lines
1.6 KiB
VimL
Raw Normal View History

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