gosukiwi / Blueberry

A beautiful programming language with clean syntax which compiles to PHP
MIT License
63 stars 10 forks source link

Improve generated code indentation #37

Closed gosukiwi closed 9 years ago

gosukiwi commented 9 years ago

Right now, the generated code indentation is taken from the source code, but only sometimes. It's inconsistent. The compiler should ignore empty spaces and newlines and format code in a systematic and configurable way (4-spaces, 2-spaces, tabs, etc).

For this, it's necessary to hold the current indentation state, which should be implemented in the the state.js file. This will allow to format genedated code much more consistently.

gosukiwi commented 9 years ago

Implemented in 67f4979856d9e6f1e0e6d71ff7d867af6c22ce6b. Still lacks configuration options though.