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

Subscripts on structs #165

Closed ballercat closed 5 years ago

ballercat commented 5 years ago

This patch allows for subscripts to be applied on struct fields. Currently, it's not possible to do so without assigning the field to another(array) variable.

type Struct = { length: i32, list: i32[] };

...

const struct: Struct = ...;
struct.list[0] = 42; // this is now supported
coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 207


Totals Coverage Status
Change from base Build 204: 0.005%
Covered Lines: 1919
Relevant Lines: 1919

💛 - Coveralls