Removed all references to nim-sgregex.
h3rald h3rald@h3rald.com
Sat, 20 Mar 2021 09:46:28 +0100
3 files changed,
11 insertions(+),
11 deletions(-)
M
min.vim
→
min.vim
@@ -11,7 +11,7 @@
setl iskeyword=@,36-39,+,-,*,.,/,:,~,!,48-57,60-65,94-95,192-255 setl iskeyword+=^ -syntax keyword minDefaultSymbol ! != $ % & && ' * + - -> -inf . .. / : :: < <= =% =-= == ==> => =~ > >< >= >> ? @ ROOT ^ abs accept acos aes all? and any? append apply apply-interpolate args asin ask atan atime avg bind bitand bitnot bitor bitxor boolean boolean? capitalize case cd ceil chmod choose chr clear clear-stack cleave close column-print compiled? concat confirm connect cons cos cosh cp cpu crypto ctime d2r datetime ddel ddup debug decode decode-url define defined-sigil? defined-symbol? delete-sigil delete-symbol dequote dget dhas? dict dictionary? difference dip dir? dirname div dkeys download dpairs dpick drop dsdelete dset dsget dshas? dsinit dspost dsput dsquery dsread dstore dswrite dtype dup dvalues e encode encode-url env? error escape eval even? exists? exit expect expect-all expect-any expect-empty-stack 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 help hidden? http id if import in? indent indexof inf infix-dequote info insert integer integer? interpolate intersection invoke io join keep lambda lambda-bind last length line-info linrec listen lite? ln load load-symbol log10 log2 logic loglevel loglevel? lowercase ls ls-r map map-reduce mapkey match? math md4 md5 med mini? mkdir mod mtime mv nan net newline nip not notice now null? num number? odd? one? operator opts or ord os over parent-scope parse parse-url partition password pi pick pop pow pred prefix prefix-dequote prepend print product prompt publish put-env putchr puts quit quotation? quote quote-map quotesym r2g raise random randomize range raw-args recv recv-line reduce reject remove remove-symbol repeat replace replace-apply request require rest return reverse rm rmdir rolldown rollup round run save-symbol saved-symbols scope scope-sigils scope-symbols seal-sigil seal-symbol sealed-sigil? sealed-symbol? search search-all semver-inc-major semver-inc-minor semver-inc-patch semver? send seq set set-stack sha1 sha224 sha256 sha384 sha512 shl shorten shr sigil-help sigils sin sinh sip size sleep slice socket sort source split spread sqrt stack start-server stop-server str string string? stringlike? strip substr succ suffix sum swap swons symbol-help symbols symlink symlink? symmetric-difference sys system take tan tanh tap tau tformat time timeinfo times timestamp titleize to-json to-semver to-timestamp to-yaml trunc try type type? typealias union unless unmapkey unseal-sigil unseal-symbol unzip uppercase version warn when which while with xor zip || ~ +syntax keyword minDefaultSymbol ! != $ % & && ' * + - -> -inf . .. / : :: < <= =% =-= == ==> => =~ > >< >= >> ? @ ROOT ^ abs accept acos aes all? and any? append apply apply-interpolate args asin ask atan atime avg bind bitand bitnot bitor bitxor boolean boolean? capitalize case cd ceil chmod choose chr clear clear-stack cleave close column-print compiled? concat confirm connect cons cos cosh cp cpu crypto ctime d2r datetime ddel ddup debug decode decode-url define defined-sigil? defined-symbol? delete-sigil delete-symbol dequote dget dhas? dict dictionary? difference dip dir? dirname div dkeys download dpairs dpick drop dsdelete dset dsget dshas? dsinit dspost dsput dsquery dsread dstore dswrite dtype dup dvalues e encode encode-url env? error escape eval even? exists? exit expect expect-all expect-any expect-empty-stack 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 help hidden? http id if import in? indent indexof inf infix-dequote info insert integer integer? interpolate intersection invoke io join keep lambda lambda-bind last length line-info linrec listen ln load load-symbol log10 log2 logic loglevel loglevel? lowercase ls ls-r map map-reduce mapkey match? math md4 md5 med mkdir mod mtime mv nan net newline nip not notice now null? num number? odd? one? operator opts or ord os over parent-scope parse parse-url partition password pi pick pop pow pred prefix prefix-dequote prepend print product prompt publish put-env putchr puts quit quotation? quote quote-map quotesym r2g raise random randomize range raw-args recv recv-line reduce reject remove remove-symbol repeat replace replace-apply request require rest return reverse rm rmdir rolldown rollup round run save-symbol saved-symbols scope scope-sigils scope-symbols seal-sigil seal-symbol sealed-sigil? sealed-symbol? search search-all semver-inc-major semver-inc-minor semver-inc-patch semver? send seq set set-stack sha1 sha224 sha256 sha384 sha512 shl shorten shr sigil-help sigils sin sinh sip size sleep slice socket sort source split spread sqrt stack start-server stop-server str string string? stringlike? strip substr succ suffix sum swap swons symbol-help symbols symlink symlink? symmetric-difference sys system take tan tanh tap tau tformat time timeinfo times timestamp titleize to-json to-semver to-timestamp to-yaml trunc try type type? typealias union unless unmapkey unseal-sigil unseal-symbol unzip uppercase version warn when which while with xor zip || ~ syntax match minDefaultSigil ;\<[/:@'~!?$%&=<>#^*#+]; contained syntax match minQuote ;\<['];
M
minpkg/lib/min_io.nim
→
minpkg/lib/min_io.nim
@@ -1,11 +1,11 @@
import strutils, logging, + nre, critbits, terminal import ../packages/nimline/nimline, - ../packages/nim-sgregex/sgregex, ../core/parser, ../core/value, ../core/env,@@ -109,9 +109,9 @@ let vals = i.expect("str")
let s = vals[0] proc confirm(): bool = let answer = ed.readLine(s.getString & " [yes/no]: ") - if answer.match("^y(es)?$", "i"): + if answer.contains(re"(?i)^y(es)?$"): return true - elif answer.match("^no?$", "i"): + elif answer.contains(re"(?i)^no?$"): return false else: stdout.write "Invalid answer. Please enter 'yes' or 'no': "
M
minpkg/lib/min_lang.nim
→
minpkg/lib/min_lang.nim
@@ -5,12 +5,12 @@ sequtils,
json, parseopt, algorithm, + nre, os, logging, ../core/baseutils, ../packages/niftylogger, - ../packages/nimline/nimline, - ../packages/nim-sgregex/sgregex + ../packages/nimline/nimline import ../core/env, ../core/meta,@@ -166,7 +166,7 @@
if not nv.isSymbol: raiseInvalid("Operator name must be a symbol") var n = nv.symVal - if not n.match(USER_SYMBOL_REGEX): + if not n.contains(re(USER_SYMBOL_REGEX)): raiseInvalid("Operator name must not contain invalid characters") if t == "typeclass": n = "typeclass:"&n@@ -443,7 +443,7 @@ var symbol: string
var isQuot = q1.isQuotation q1 = @[q1].newVal symbol = sym.getString - if not symbol.match USER_SYMBOL_REGEX: + if not symbol.contains re(USER_SYMBOL_REGEX): 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:@@ -457,7 +457,7 @@ var s = vals[1].getString
if not i.validType(s): raiseInvalid("Invalid type expression: $#" % s) let symbol = "typealias:"&sym - if not sym.match USER_SYMBOL_REGEX: + if not sym.contains re(USER_SYMBOL_REGEX): raiseInvalid("Symbol identifier '$1' contains invalid characters." % sym) info "[typealias] $1 = $2" % [sym, s] if i.scope.symbols.hasKey(symbol) and i.scope.symbols[symbol].sealed:@@ -470,7 +470,7 @@ let sym = vals[0]
var q1 = vals[1] var symbol: string symbol = sym.getString - if not symbol.match USER_SYMBOL_REGEX: + if not symbol.contains re(USER_SYMBOL_REGEX): raiseInvalid("Symbol identifier '$1' contains invalid characters." % symbol) info "[lambda] $1 = $2" % [symbol, $q1] if i.scope.symbols.hasKey(symbol) and i.scope.symbols[symbol].sealed:@@ -928,7 +928,7 @@ def.symbol("unseal-sigil") do (i: In):
let vals = i.expect("'sym") let sym = vals[0].getString var s = i.scope.getSigil(sym) - if not sym.match USER_SYMBOL_REGEX: + if not sym.contains re(USER_SYMBOL_REGEX): # Prevent accidentally unsealing system sigils # Not that they can redefined, but still raiseInvalid("Attempting to unseal system sigil: " & sym)