<div dir="ltr"><div>I am (still) working on !2418 to bring the API Annotations into the GHC ParsedSource, and making good progress.</div><div><br></div><div>I am currently making a rough port of ghc-exactprint, to ensure I can get all the tests around modifying the AST to work.</div><div><br></div><div>One of the last pieces is being able to capture the spacing from the last token in the file to the EOF.  I guess technically it is the second last token.</div><div><br></div><div>Empirically (calling getTokenStream), it seems this is always ITsemi.  I am not sure how this comes about, as the `module` parsing rule in Parser.y ends with body or body2, and those both finish with an actual or virtual '}'.</div><div><br></div><div>Can I rely on the token before ITEof always being ITsemi?</div><div><br></div><div>Alan<br></div></div>