added first draft
drkameleon yaniszaf@gmail.com
Thu, 21 Jan 2021 13:25:27 +0100
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")