all repos — min @ 9006f0a492ba8f557acd4b9c6864de1735526cf9

A small but practical concatenative programming language.

added first draft
drkameleon yaniszaf@gmail.com
Thu, 21 Jan 2021 13:25:27 +0100
commit

9006f0a492ba8f557acd4b9c6864de1735526cf9

parent

783bd9a6ca99be323003cfa12bb01649509d3ca2

1 files changed, 18 insertions(+), 0 deletions(-)

jump to
A minpkg/lib/min_binary.nim

@@ -0,0 +1,18 @@

+import + ../core/parser, + ../core/value, + ../core/interpreter, + ../core/utils + +proc binary_module*(i: In)= + + let def = i.define() + + def.symbol("bitand") do (i: In): + let vals = i.expect("int","int") + let b = vals[0] + let a = vals[1] + + i.push newVal(a.intVal mod b.intVal) + + def.finalize("binary")