Open binji opened 9 years ago
char hexit(int x) { return "0123456789abcdef"[x]; }
This generates output:
(func $hexit (param i32) (result i8) (local i32 i32 i32 i32) (set_local 1 (get_local 0)) (set_local 2 (i32.const 0)) (set_local 3 (i32.add (get_local 2) (get_local 1))) (set_local 4 (i32.load8_s (get_local 3))) (return (get_local 4)) )
with error:
hex.wast:10:13: unexpected token "i8"
This generates output:
with error: