dimitriv / Ziria

A domain-specific-language and compiler for low-level bitstream processing.
92 stars 18 forks source link

Static initialization of complex/struct array #28

Closed bradunov closed 9 years ago

bradunov commented 9 years ago

The following code does not parse:

let f(a:arr int) = var c : arr[2] complex16 := {complex16{re=0; im=0}, complex16{re=0; im=0}}; return 0 in read[int] >>> emit f({1,2}) >>> write[int]

since static initialization of complex array seems not allowed at the moment.

edsko commented 9 years ago

This is more than just a parser change; the AST cannot represent this either, and hence codegen would have to be modified too. @dimitriv ?

edsko commented 9 years ago

Partly implemented. See #85.