Improved management of data types.
h3rald h3rald@h3rald.com
Wed, 17 Jun 2020 11:11:23 +0200
3 files changed,
8 insertions(+),
1 deletions(-)
M
lib/min_lang.nim
→
lib/min_lang.nim
@@ -149,6 +149,10 @@ dict.filename = i.filename
dict.scope = i.scope i.push dict + def.symbol("type") do (i: In): + let vals = i.expect("a") + i.push vals[0].typeName.newVal + def.symbol("import") do (i: In): var vals = i.expect("'sym") let rawName = vals[0]
M
lib/min_logic.nim
→
lib/min_logic.nim
@@ -220,6 +220,6 @@ let vals = i.expect("'sym", "a")
if vals[1].isTypedDictionary(vals[0].getString): i.push true.newVal else: - i.push false.newVal + i.push (vals[1].typename == vals[0].getString).newVal def.finalize("logic")
M
site/contents/reference-io.md
→
site/contents/reference-io.md
@@ -73,6 +73,9 @@
{#op||puts!||{{any}}||{{null}}|| Prints {{any}} and a new line to STDOUT, removing {{any}} from the stack.#} +{#op||type||{{any}}||{{s}}|| +Puts the data type of {{any}} on the stack. In cased of typed dictionaries, the type name is prefixed by `dict:`, e.g. `dict:module`, `dict:socket`, etc.#} + {#op||warning||{{any}}||{{any}}|| Prints {{any}} and a new line to STDERR, if logging level is set to [warning](class:kwd) or lower.#}