Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
chaiscript.vim95 linesDownload Raw Back to syntax
1" Vim syntax file2" Language:	ChaiScript3" Maintainer:	Jason Turner <lefticus 'at' gmail com>4 5" Quit when a (custom) syntax file was already loaded6if exists("b:current_syntax")7  finish8end9 10syn case match11 12" syncing method13syn sync fromstart14 15" Strings16syn region chaiscriptString        start=+"+ end=+"+ skip=+\\\\\|\\"+ contains=chaiscriptSpecial,chaiscriptEval,@Spell17 18" Escape characters19syn match  chaiscriptSpecial       contained "\\[\\abfnrtv\'\"]\|\\\d\{,3}" 20 21" String evals22syn region chaiscriptEval          contained start="${" end="}" 23 24" integer number25syn match  chaiscriptNumber        "\<\d\+\>"26 27" floating point number, with dot, optional exponent28syn match  chaiscriptFloat         "\<\d\+\.\d*\%(e[-+]\=\d\+\)\=\>"29 30" floating point number, starting with a dot, optional exponent31syn match  chaiscriptFloat         "\.\d\+\%(e[-+]\=\d\+\)\=\>"32 33" floating point number, without dot, with exponent34syn match  chaiscriptFloat         "\<\d\+e[-+]\=\d\+\>"35 36" Hex strings37syn match  chaiscriptNumber        "\<0x\x\+\>"38 39" Binary strings40syn match  chaiscriptNumber        "\<0b[01]\+\>"41 42" Various language features43syn keyword chaiscriptCond         if else44syn keyword chaiscriptRepeat       while for do45syn keyword chaiscriptStatement    break continue return46syn keyword chaiscriptExceptions   try catch throw47 48"Keyword49syn keyword chaiscriptKeyword      def true false attr50 51"Built in types52syn keyword chaiscriptType         fun var53 54"Built in funcs, keep it simple55syn keyword chaiscriptFunc         eval throw56 57"Let's treat all backtick operator function lookups as built in too58syn region  chaiscriptFunc         matchgroup=chaiscriptFunc start="`" end="`"59 60" Account for the "[1..10]" syntax, treating it as an operator61" Intentionally leaving out all of the normal, well known operators62syn match   chaiscriptOperator     "\.\."63 64" Guard separator as an operator65syn match   chaiscriptOperator     ":"66 67" Comments68syn match   chaiscriptComment      "//.*$" contains=@Spell69syn region  chaiscriptComment      matchgroup=chaiscriptComment start="/\*" end="\*/" contains=@Spell70 71 72 73hi def link chaiscriptExceptions	Exception74hi def link chaiscriptKeyword		Keyword75hi def link chaiscriptStatement		Statement76hi def link chaiscriptRepeat		Repeat77hi def link chaiscriptString		String78hi def link chaiscriptNumber		Number79hi def link chaiscriptFloat		Float80hi def link chaiscriptOperator		Operator81hi def link chaiscriptConstant		Constant82hi def link chaiscriptCond		Conditional83hi def link chaiscriptFunction		Function84hi def link chaiscriptComment		Comment85hi def link chaiscriptTodo		Todo86hi def link chaiscriptError		Error87hi def link chaiscriptSpecial		SpecialChar88hi def link chaiscriptFunc		Identifier89hi def link chaiscriptType		Type90hi def link chaiscriptEval	        Special91 92let b:current_syntax = "chaiscript"93 94" vim: nowrap sw=2 sts=2 ts=8 noet95 
codekingpro/portable-devtools · Team Ai