dimitriv / Ziria

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

Flatten Seq into BindMany in PassFold.flatten_multibind #58

Open valderman opened 9 years ago

valderman commented 9 years ago

With 71ba27e we have a pass which flattens nested occurrences of BindMany. It should flatten BindMany first [... (x, Seq a b) ...] into BindMany first [... (x, a), (dummy_var, b), ...] as well. Need some kind of dummy var there to hold the non-result of a, and possibly a slight change to the code generator to avoid generating that dummy var.