using selfhost.vm.core as MiniVm

static box Main {
  main(args) {
    local json = "{\"kind\":\"Program\",\"statements\":[{\"kind\":\"Print\",\"expression\":{\"kind\":\"FunctionCall\",\"name\":\"echo\",\"arguments\":[]}},{\"kind\":\"Print\",\"expression\":{\"kind\":\"FunctionCall\",\"name\":\"itoa\",\"arguments\":[]}}]}"

    local arr = new MiniVm().collect_prints(json)
    print("DEBUG: arr.size=" + arr.length())
    local i = 0
    loop (i < arr.length()) { print(arr.get(i))  i = i + 1 }
    return 0
  }
}
// migrated from .hako to .hako (branding)
