g2384 / VHDLFormatter

VHDL formatter web online written in typescript
https://g2384.github.io/VHDLFormatter/
MIT License
52 stars 20 forks source link

Fix for #43 #44

Closed fenkes-ibm closed 3 years ago

fenkes-ibm commented 3 years ago

First get the failing unit tests down to two nontrivial fails, then add a failing test and finally implement a fix for #43. (Of course this is totally the order in which I coded up these changes ;) )

g2384 commented 3 years ago

Thanks for this PR. This is a bold refactoring. I'll check it out and see if all tests are passed. I can feel that the code has definitely been improved a lot.

fenkes-ibm commented 3 years ago

Thanks! The way I implemented it still has its brittle points - you have to know when to create a sub-block and when to just advance the current block's cursor based on how the specific code path is written - but it's a start and fixes the immediate bug :)

Kudos for having a BILLION unit tests that helped me weed out bugs and get a warm fuzzy feeling that my refactoring actually didn't break anything.