all repos — min @ e9a3dc6d96839c4bf783f92f9299f8eb9ae9f8de

A small but practical concatenative programming language.

Fixed import error due to unnecessary parsing of nimble file.
h3rald h3rald@h3rald.com
Sat, 24 Nov 2018 12:50:38 +0100
commit

e9a3dc6d96839c4bf783f92f9299f8eb9ae9f8de

parent

a2f035f1ab35099260bc87f31a61cac8c7d30c27

6 files changed, 16 insertions(+), 43 deletions(-)

jump to
M core/consts.nimcore/consts.nim

@@ -1,41 +1,11 @@

import - os, - parsecfg, - streams, - strutils, - logging + os const - cfgfile = "../min.nimble".slurp - -var - appname* = "min" - version*: string - f = newStringStream(cfgfile) - -if f != nil: - var p: CfgParser - open(p, f, "../min.nimble") - while true: - var e = next(p) - case e.kind - of cfgEof: - break - of cfgKeyValuePair: - case e.key: - of "version": - version = e.value - else: - discard - of cfgError: - fatal("Configuration error.") - quit(1) - else: - discard - close(p) -else: - fatal("Cannot process configuration file.") - quit(2) + pkgName* = "min" + pkgVersion* = "0.19.2" + pkgAuthor* = "Fabio Cevasco" + pkgDescription* = "A tiny concatenative programming language and shell." var HOME*: string
M lib/min_http.nimlib/min_http.nim

@@ -6,7 +6,7 @@ ../core/value,

../core/interpreter, ../core/utils -let minUserAgent = "$1 http-module/$2" % [appname, version] +let minUserAgent = "$1 http-module/$2" % [pkgName, pkgVersion] proc newCli(): HttpClient = return newHttpClient(userAgent = minUseragent)
M lib/min_lang.nimlib/min_lang.nim

@@ -484,7 +484,7 @@ i.dequote(r2)

i.linrec(p, t, r1, r2) def.symbol("version") do (i: In): - i.push version.newVal + i.push pkgVersion.newVal # Save/load symbols
M min.nimmin.nim

@@ -286,7 +286,7 @@ Default: notice

-e, --evaluate Evaluate a $1 program inline -h, —-help Print this help -v, —-version Print the program version - -i, —-interactive Start $1 shell""" % [appname, version] + -i, —-interactive Start $1 shell""" % [pkgName, pkgVersion] var file, s: string = "" var args = newSeq[string](0)

@@ -313,7 +313,7 @@ echo usage

quit(0) of "version", "v": if file == "": - echo version + echo pkgVersion quit(0) of "interactive", "i": if file == "":
M min.nimblemin.nimble

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

+import + core/consts + # Package -version = "0.19.1" -author = "Fabio Cevasco" -description = "A tiny concatenative programming language and shell." +version = pkgVersion +author = pkgAuthor +description = pkgDescription license = "MIT" bin = @["min"]
M site/settings.jsonsite/settings.json

@@ -5,6 +5,6 @@ "templates": "templates",

"temp": "temp", "output": "output", "title": "min language", - "version": "0.19.1", + "version": "0.19.2", "rules": "rules.min" }