Closed tabularelf closed 4 months ago
This was intentional because Catspeak has block scoping unlike GML. I'll think about changing this.
Yeah I have noticed the block scoping part. It did caught me off guard, but it's honestly livable. Though I suppose GML wise, that could too be extended for optional support but wobbles hands I do not have the final say!
What is your feature request?
If you have this code
The parser will fail because you cannot currently assign a local the same name. While this is actually good practice imho, this also makes code like GML to break because GameMaker allows this. I already have made a quick patcharound in the parser in my own projects, but the IR should handle this.
Please describe in detail how you expect this new feature to behave.
Either:
allocLocal
that allows reusing the same local space at will. (Would require updating allocLocal calls everywhere)allocLocal
, but doesn't care about whether it exists or not. (Reuses the same local space if it exists, creates a new local register if it doesn't, etc)