dyon icon indicating copy to clipboard operation
dyon copied to clipboard

Left expression patterns

Open bvssvni opened this issue 8 years ago • 1 comments

Would be nice to have patterns in left side expressions to declare multiple variables at once:

[a, b] := [1, 2]
{x: a, y: y} := {x: 1, y: 2}
{x, y} := {x: 1, y: 2}

bvssvni avatar Jun 22 '16 10:06 bvssvni

Could use rewrite of the AST:

[a, b] := [1, 2]

becomes:

_tmp := [1, 2]
a := _tmp[0]
b := _tmp[1]

bvssvni avatar Jan 06 '17 02:01 bvssvni