Various bugs in the GExperts code formatter fixed

There were some long standing bugs in the GExperts code formatter, most of them concerning language features that didn’t exist back in Delphi 2007 (and therefore were not my primary concern for a long time). I have fixed several of them now:

  • Anonymous methods were not indented correctly
  • Various problems with Generics as reported here and some more I found myself while testing the ones reported

In addition there are the bugs I already fixed last weekend:

  • Variant records with methods were not indented correctly
  • The formatter did not know the ‘final’ keyword

I’m pretty sure that the quality of the GExperts code formatter now exceeds the one of the built in formatter in the Delphi IDE (which in my eyes only recently became actually usable, the first versions were just bug ridden proofs of concept). That of course doesn’t mean that it is perfect now. If you find any more bugs, please report them! I cannot fix bugs that I am not aware of and there are still a lot of language features that I don’t or rarely use myself. Please include examples of wrongly and correctly formatted code with these reports (as actual text, not as a bitmap).