Implemented $ references for functions and parameters, which are also parsed for real now, along with the result. Setup for locals added, but not it's backend. Added pretty interesting add-dict-to-env function to collections.kp, which has also been added to put collections stuff in one place.

This commit is contained in:
Nathan Braswell
2021-07-20 00:37:27 -04:00
parent 835706c97d
commit e271feed24
5 changed files with 69 additions and 20 deletions

View File

@@ -5,13 +5,16 @@
true *ARGV*)
_ (println "out" out)
wasm_code (module
(func (param i32) (result i32)
(i32.const 4)
(local.get 0)
(func $add (param $num i32) (result i32)
(local $tmp1 i32)
(local $tmp2 i32)
(i32.const 11)
(local.get $num)
i32.add
(i32.add (local.get 0))
(i32.add (local.get $num))
)
(export "add" (func 0))
; nothing
(export "add" (func $add))
)