aver-lang 0.26.0

VM and transpiler for Aver, a statically-typed language designed for AI-assisted development
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13

        (module
          {decls}
          (func (export "helper") (param $arr (ref null $mag)) (result i32)
            (local $len i32)
            (local.set $len (array.len (local.get $arr)))
            (block $bl (loop $lp
              (br_if $bl (i32.eqz (local.get $len)))
              (br_if $bl (i64.ne (array.get $mag (local.get $arr) (i32.sub (local.get $len) (i32.const 1))) (i64.const 0)))
              (local.set $len (i32.sub (local.get $len) (i32.const 1)))
              (br $lp)))
            (local.get $len)))