Changes between Initial Version and Version 1 of Ticket #13

Show
Ignore:
Timestamp:
05/25/09 23:25:35 (6 years ago)
Author:
nibro
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13 – description

    initial v1  
    33The overall goal is to support a round-trip parser and pretty-printer so that pretty . parse == id. This requires a number of additions to the current library: 
    44 
    5 * The AST must be embellished with support for comments. These will not be interspersed in the actual AST (unless we want to give special treatment to Haddock comments), instead residing in a separate structure along the AST. 
    6 * We must have a (presumably two pass) parser that handles both code and comments, and remembers exact source locations for both. 
    7 * The pretty-printer is probably the most involved. It must print the AST and comments ''exactly'' as they were parsed, at the exact same line and column. This will probably require an entirely new pretty-printer, leaving the old one as it stands for simple usage. 
     5 * The AST must be embellished with support for comments. These will not be interspersed in the actual AST (unless we want to give special treatment to Haddock comments), instead residing in a separate structure along the AST. 
     6 * We must have a (presumably two pass) parser that handles both code and comments, and remembers exact source locations for both. 
     7 * The pretty-printer is probably the most involved. It must print the AST and comments ''exactly'' as they were parsed, at the exact same line and column. This will probably require an entirely new pretty-printer, leaving the old one as it stands for simple usage. 
    88 
    99There are some open issues here too, such as what to do with trailing whitespace, and what to do with tabs. I'm currently leaning towards discarding trailing whitespace and transforming tabs into 8 spaces.