all repos — hex @ f27ecf68bbf8d888b463fe1a071e6f7e696a21ce

A tiny, minimalist, slightly-esoteric concatenative programming lannguage.

hex.vim

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
" Vim syntax file
" Language: hex
" Maintainer: Fabio Cevasco
" Last Change: 2024-12-10
" Version: 0.1.0

if exists("b:current_syntax")
  finish
endif

syntax keyword          hexNativeSymbol         if when while error try dup pop swap stack clear and or not xor int str hex dec type 
syntax keyword          hexNativeSymbol         cat chr len get ord index join split replace each map puts warn print gets 
syntax keyword          hexNativeSymbol         read write append args exit exec run
syntax match            hexNativeSymbol         /\v\!/
syntax match            hexNativeSymbol         /\v\!\=/ 
syntax match            hexNativeSymbol         /\v\%/
syntax match            hexNativeSymbol         /\v\&\&/
syntax match            hexNativeSymbol         /\v\./
syntax match            hexNativeSymbol         /\v\'/
syntax match            hexNativeSymbol         /\v\+/
syntax match            hexNativeSymbol         /\v\-/
syntax match            hexNativeSymbol         /\v\*/
syntax match            hexNativeSymbol         /\v\//
syntax match            hexNativeSymbol         /\v\::/
syntax match            hexNativeSymbol         /\v\:/
syntax match            hexNativeSymbol         /\v\</
syntax match            hexNativeSymbol         /\v\>/
syntax match            hexNativeSymbol         /\v\<\=/
syntax match            hexNativeSymbol         /\v\=\=/
syntax match            hexNativeSymbol         /\v\>\=/
syntax match            hexNativeSymbol         /\v\>\>/
syntax match            hexNativeSymbol         /\v\<\</
syntax match            hexNativeSymbol         /\v\^/
syntax match            hexNativeSymbol         /\v\~/
syntax match            hexNativeSymbol         /\v\|\|/
syntax match            hexNativeSymbol         /\v\|/
syntax match            hexNativeSymbol         /\v\#/
syntax match            hexNativeSymbol         /\v\&/

syntax match            hexUserSymbol         ;[_a-zA-Z_][a-zA-Z0-9_-]*; 

syntax keyword          hexCommentTodo        TODO FIXME XXX TBD contained
syntax match            hexComment            /;.*$/ contains=hexCommentTodo
syntax region           hexComment            start=;#|; end=;|#; contains=hexCommentTodo

syntax match            hexNumber             ;0x[0-9a-f]\{1,8\};
syntax region           hexString             start=+"+ skip=+\\\\\|\\$"+  end=+"+  


syntax match            hexParen              ;(\|); 

syntax match            hexSharpBang          /\%^#!.*/


" Highlighting
hi default link         hexComment            Comment
hi default link         hexCommentTodo        Todo
hi default link         hexString             String
hi default link         hexNumber             Number
hi default link         hexNativeSymbol       Statement
hi default link         hexUserSymbol         Identifier
hi default link         hexParen              Special
hi default link         hexSharpBang          Preproc

let b:current_syntax = "hex"