Closed helmutwecke closed 3 years ago
Thanks a lot! I think the indentation for forall
works correctly for forall constructs (forall ... end forall) but fails for forall statements (on a single line). Is this why you introduced the --statement-constructs
option?
I prefer that this new features works for both cases, but I know that parsing forall is difficult. I'll have a closer look into this.
Hello,
We introduced the --statement-constructs option, because we only work with where and forall constucts in DFTB+. We do not use where or forall statements. For such cases I think it is a good idea to have an option to choose only blocks. If this option is not chosen, then fprettify will work as it did before, which means only with the where and forall one-line statements.
As promised, I worked on a stable parser that works for both where
/ forall
constructs and statements. Indentation is enabled by default and --statement-constructs
is not needed. Let me know if there are issues with any of the new features.
Hello @pseewald,
I added a functionality that indents where and forall constructs, when its parser is True. When the parser is False (default), the original functionality of where and forall statements is preserved. This addition was made by request of @aradi who is interested in using fprettify.
Best regards, Helmut Wecke