ballercat / walt

:zap: Walt is a JavaScript-like syntax for WebAssembly text format :zap:
https://ballercat.github.io/walt/
MIT License
4.64k stars 122 forks source link

Validate array subscripts with better error messages #169

Closed ballercat closed 5 years ago

ballercat commented 5 years ago

Resolves #168

Subscripts on non-array types will now show up with following error messages:

               v += a[i];␊
               ^ Expected array type for a, received i32␊
      Invalid subscript target␊
        at fn() (spec.walt:11:12)␊