all repos — min @ 68243bde5c29c633eef09420ec8ee0d018b48f06

A small but practical concatenative programming language.

Modified regexp for symbols, fixed vim syntax highlighting.
h3rald h3rald@h3rald.com
Sat, 25 Mar 2017 14:21:26 +0100
commit

68243bde5c29c633eef09420ec8ee0d018b48f06

parent

a08657f4502acc2c00303d5aa6ffb6e18f8c3bef

2 files changed, 2 insertions(+), 2 deletions(-)

jump to
M lib/min_lang.nimlib/min_lang.nim

@@ -94,7 +94,7 @@ var symbol: string

if not q1.isQuotation: q1 = @[q1].newVal(i.scope) symbol = sym.getString - if not symbol.match "^[a-zA-Z0-9_][a-zA-Z0-9/!?+*._-]*$": + if not symbol.match "^[a-zA-Z_][a-zA-Z0-9/!?+*._-]*$": raiseInvalid("Symbol identifier '$1' contains invalid characters." % symbol) info "[define] $1 = $2" % [symbol, $q1] if i.scope.symbols.hasKey(symbol) and i.scope.symbols[symbol].sealed:
M min.vimmin.vim

@@ -31,7 +31,7 @@ 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-Z0-9+._-][a-zA-Z0-9/!?+*._-]*; +syntax match minSymbol ;[a-zA-Z._][a-zA-Z0-9/!?+*._-]*; syntax match minParen ;(\|);