pragmagic / godot-nim

Nim bindings for Godot Engine
https://pragmagic.github.io/godot-nim/
Other
497 stars 27 forks source link

Improved error handling using macros.error #117

Closed beef331 closed 2 years ago

beef331 commented 2 years ago

Previously declaring let/const in the gdobj body would error with helpless parse error, this makes it so they get declared before the object.

endragor commented 2 years ago

Thanks for the PR! But I think we should rather make the errors useful. Currently, whatever is declared within the gdobj scope becomes a part of that class and can be accessed with self.symbol. This change breaks this assumption.

beef331 commented 2 years ago

Hopefully this makes everyone happy, better error handling now with proper lines on error.