all repos — min @ 29d53e438796d1830a562d1f4f1d75f854554228

A small but practical concatenative programming language.

Added task to update vim syntax file
h3rald h3rald@h3rald.com
Mon, 07 Dec 2020 05:36:24 +0100
commit

29d53e438796d1830a562d1f4f1d75f854554228

parent

e3936769c898b6986367e6baeb3eb61c03397742

5 files changed, 86 insertions(+), 5 deletions(-)

jump to
M min.vimmin.vim

@@ -1,8 +1,8 @@

" Vim syntax file " Language: min " Maintainer: Fabio Cevasco -" Last Change: 03 June 2018 -" Version: 0.17.0 +" Last Change: 07 Dec 2020 +" Version: 0.23.0 if exists("b:current_syntax") finish

@@ -11,9 +11,9 @@

setl iskeyword=@,36-39,+,-,*,.,/,:,~,!,48-57,60-65,94-95,192-255 setl iskeyword+=^ -syntax keyword minDefaultSymbol ! != $ & ' * + # - % ^ -> . .. / ยง : = # < <= == => =~ > >= @ -inf ROOT accept acos aes all? and any? append apply args asin ask atan atime bind bool boolean? call call! capitalize case cd ceil chmod choose clear-stack cleave close column-print concat confirm connect cons cos cosh cp cpu crypto ctime d2r datetime ddel ddup debug decode define defined? delete dequote dequote-and dequote-or dget dhas? dkeys dict dictionary? dip dir? dirname div download dpick dprint dprint! drop dset dup dvalues e encode env? error eval even? exists? exit expect fappend fatal find file? filename filter first flatten float float? floor foreach fperms fread from-json format-error fs fsize fstats ftype fwrite get get-content gets get-env get-stack hardlink harvest hidden? http id if import in? indent indexof inf info insert int integer? interpolate interval io join keep last length linrec listen lite? ln load load-symbol log2 log10 logic loglevel loglevel? lowercase ls ls-r map map-reduce match math md5 mkdir mod module mtime mv nan newline net nip not notice now num number? odd? opts os over parse partition password pi pick pop popd pow pred prepend print print! prompt publish puts puts! put-env q quotation? quote quote-bind quote-define quote-map r2d random randomize raise read recv recv-line reduce regex reject remove remove-symbol repeat replace request rest reverse rm rmdir round run save-symbol scope scope? scope-symbols scope-sigils seal search send seq set set-stack set-type sha1 sha224 sha256 sha384 sha512 shorten sigils sin sinh sip size sleep slice socket sort source split spread sqrt stack start-server startup stop-server stored-symbols str string string? strip succ sum swap swons symbols symlink symlink? sys system take tan tanh tap tap! tau tformat time timeinfo times timestamp titleize to-json to-timestamp try trunc type? unless substr unseal unzip uppercase version warn when which while with xor zip +syntax keyword minDefaultSymbol ! !! != # $ % & ' * + - -> -inf . .. / : < <= = =% == => =~ > >< >= >> @ ROOT ^ accept acos aes all? and any? append apply apply-interpolate args asin ask atan atime bind bool boolean? call capitalize case cd ceil chmod choose chr clear-stack cleave close column-print concat confirm connect cons cos cosh cp cpu crypto ctime d2r datetime ddel ddup debug decode define defined? delete dequote dequote-and dequote-or dget dhas? dict dictionary? dip dir? dirname div dkeys download dpairs dpick drop dset dtype dup dvalues e encode env? error escape eval even? exists? exit expect fappend fatal file? filename filter find first flatten float float? floor foreach format-error fperms fread from-json from-semver from-yaml fs fsize fstats ftype fwrite get get-content get-env get-stack getchr gets hardlink harvest hidden? http id if import in? indent indexof inf infix-dequote info insert int integer? interpolate io join keep last length linrec listen lite? ln load load-symbol log10 log2 logic loglevel loglevel? lowercase ls ls-r map map-reduce match math md5 mkdir mod module mtime mv nan net newline nip not notice now num number? odd? opts or ord os over parse partition password pi pick pop pow pred prefix prefix-dequote prepend print print! prompt publish put-env putchr puts puts! quit quotation? quote quote-bind quote-define quote-map r2g raise random randomize raw-args read recv recv-line reduce regex reject remove remove-symbol repeat replace request rest reverse rm rmdir rolldown rollup round run save-symbol saved-symbols scope scope-sigils scope-symbols seal search semver-inc-major semver-inc-minor semver-inc-patch semver? send seq set set-stack set-type sha1 sha224 sha256 sha384 sha512 shorten sigils sin sinh sip size sleep slice socket sort source split spread sqrt stack start-server stop-server str string string? strip substr succ suffix sum swap swons symbols symlink symlink? sys system system! take tan tanh tap tap! tau tformat time timeinfo times timestamp titleize to-json to-semver to-timestamp to-yaml trunc try type type? unless unseal unzip uppercase version warn when which while with xor zip -syntax match minDefaultSigil ;\<[/:@'~!?$%&$=<>#^*#+]; contained +syntax match minDefaultSigil ;\<[/:@'~!?$%&=<>#^*#+]; contained syntax match minQuote ;\<[']; syntax match minQuotedBinding ;#; syntax match minBinding ;@;

@@ -25,7 +25,7 @@ syntax match minNumber ;[-+]\=\d\+\(\.\d*\)\=;

syntax keyword minBoolean true false syntax region minString start=+"+ skip=+\\\\\|\\$"+ end=+"+ -syntax region minSigilSymbol start=;\<[/:@'~!?$%&$=<>^*#+]; end=;\>; contains=minDefaultSigil +syntax region minSigilSymbol start=;\<[/:@'~!?$%&=<>^*#+]; end=;\>; contains=minDefaultSigil syntax region minQuotedSymbol start=;\<[']; end=;\>; contains=minQuote syntax region minBoundSymbol start=;@; end=;\>; contains=minBinding syntax region minQuotedBoundSymbol start=;#; end=;\>; contains=minQuotedBinding
M run.minrun.min

@@ -1,5 +1,8 @@

#!/usr/bin/env min +;Capture a reference of default symbols before more are added +symbols =min-symbols + ; Validation (args size 2 <) ("No task specified" error 1 exit) when
M tasks/build.mintasks/build.min

@@ -36,6 +36,15 @@ "hastysite" required

"Building - site" notice "cd site && hastysite build && cd .." ! ) :build-site +( + config /version :min-version + "tasks/templates/min.vim" fread :template + timestamp "dd MMM YYYY" tformat :date + min-symbols " " join :symbols + "min.vim" :out-file + "Building - min.vim" notice + template ("date" date "version" min-version "symbols" symbols) =% out-file fwrite +) :build-vim ; Define module {}

@@ -57,4 +66,7 @@ (

build-guide build-site ) %docs +( + build-vim +) %vim +build-tasks
A tasks/ssh.min

@@ -0,0 +1,8 @@

+#!/usr/bin/env min + +"min.yml" fread from-yaml :config + +; Helpers +( + :prog (prog which "" ==) ("$# is not available" (prog) =% error 1 exit) when +) :required
A tasks/templates/min.vim

@@ -0,0 +1,58 @@

+" Vim syntax file +" Language: min +" Maintainer: Fabio Cevasco +" Last Change: $date +" Version: $version + +if exists("b:current_syntax") + finish +endif + +setl iskeyword=@,36-39,+,-,*,.,/,:,~,!,48-57,60-65,94-95,192-255 +setl iskeyword+=^ + +syntax keyword minDefaultSymbol $symbols + +syntax match minDefaultSigil ;\<[/:@'~!?$$%&=<>#^*#+]; contained +syntax match minQuote ;\<[']; +syntax match minQuotedBinding ;#; +syntax match minBinding ;@; + +syntax keyword minCommentTodo TODO FIXME XXX TBD contained +syntax match minComment /;.*$$/ contains=minCommentTodo + +syntax match minNumber ;[-+]\=\d\+\(\.\d*\)\=; +syntax keyword minBoolean true false +syntax region minString start=+"+ skip=+\\\\\|\\$$"+ end=+"+ + +syntax region minSigilSymbol start=;\<[/:@'~!?$$%&=<>^*#+]; end=;\>; contains=minDefaultSigil +syntax region minQuotedSymbol start=;\<[']; end=;\>; contains=minQuote +syntax region minBoundSymbol start=;@; end=;\>; contains=minBinding +syntax region minQuotedBoundSymbol start=;#; end=;\>; contains=minQuotedBinding +syntax match minSymbol ;[a-zA-Z._][a-zA-Z0-9/!?+*._-]*; + +syntax match minParen ;(\|)\|{\|}; + +syntax match minSharpBang /\%^#!.*/ + + +" Highlighting +hi default link minComment Comment +hi default link minCommentTodo Todo +hi default link minString String +hi default link minSigilSymbol String +hi default link minNumber Number +hi default link minBoolean Boolean +hi default link minDefaultSymbol Statement +hi default link minQuote Delimiter +hi default link minBinding Delimiter +hi default link minQuotedBinding Delimiter +hi default link minDefaultSigil Delimiter +hi default link minSymbol Identifier +hi default link minQuotedSymbol Special +hi default link minBoundSymbol Special +hi default link minQuotedBoundSymbol Special +hi default link minParen Special +hi default link minSharpBang Preproc + +let b:current_syntax = "min"