Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pretty printer spacing between decls is inconsistent #1342

Open
joscoh opened this issue Aug 6, 2021 · 0 comments
Open

Pretty printer spacing between decls is inconsistent #1342

joscoh opened this issue Aug 6, 2021 · 0 comments
Labels
kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny part: printer Pretty printer for Dafny's AST

Comments

@joscoh
Copy link

joscoh commented Aug 6, 2021

I am constructing a module via the Dafny AST C# AST, then printing it using PrintTopLevelDecls. I have a ModuleDefinition, and its TopLevelDecls are, in order, two (or more) AliasModuleDecls, and a DefaultClassDecl with the rest of the module code. The resulting pretty-printed Dafny looks like this:

module A {

  import B = ...

  import C = ...
  function foo() ...
}

Ie, there are newlines between each of the module imports, but no newline between the last module import and the default class. Within the class, each of the declared functions have a newline between them. So before the default class is the only place at which a newline is not printed between subsequent declarations.

@robin-aws robin-aws added part: printer Pretty printer for Dafny's AST kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny labels Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny part: printer Pretty printer for Dafny's AST
Projects
None yet
Development

No branches or pull requests

2 participants