asmcup / runtime

Runtime and compiler for the Assembly Cup
https://asmcup.github.io
MIT License
139 stars 11 forks source link

pushf accepts no numeric addresses #186

Closed MLanghof closed 7 years ago

MLanghof commented 7 years ago

It only accepts (decimal) numbers and labels.

I can see why this could be intentional (pushf 220 shouldn't behave very differently than pushf 220.0), but the decompiler didn't get the memo, so...

This fix should hopefully mean that decompile -> compile will always reproduce a program.

MLanghof commented 7 years ago

In a discussion with @krisives, it was established that we want to start enforcing the usage of the # for all literals, including floats.

This will represent an API change and may break programs, but the compiler error message shall be helpful for figuring it out.