bromagosa / Snap4Arduino

Binding Snap! and Arduino together
http://snap4arduino.rocks
GNU Affero General Public License v3.0
133 stars 85 forks source link

Variadic blocks fail to translate #327

Open dragazo opened 5 months ago

dragazo commented 5 months ago

I know it was mentioned in #325 that Arduino sketch translatability may not be a feature going forward, but in case it is, I have the following bug to report.

Previously, the normal binary operators like _ + _ and friends could translate just fine. However, the new variadic versions from latest Snap seem to translate incorrectly. They convert to (_ op (_ op <#2>)), even if only two values are provided. When no values are provided, they become ( op ( op <#2>)). Given that lists are not supported in translatable mode, the easiest fix might be switching the palette to only show the old, non-variadic versions of blocks, which are still defined in Snap for backwards compatibility.