EPA: Do not collect comments from end of file
In Parser.y semis1 production triggers for the virtual semi at the end of the file. This is detected by it being zero length. In this case, do not extend the span being used to gather comments, so any final comments are allocated at the module level instead.
Showing
- compiler/GHC/Parser.y 4 additions, 2 deletionscompiler/GHC/Parser.y
- testsuite/tests/ghc-api/exactprint/RmDecl4.expected.hs 0 additions, 1 deletiontestsuite/tests/ghc-api/exactprint/RmDecl4.expected.hs
- testsuite/tests/ghc-api/exactprint/Test20239.stderr 9 additions, 10 deletionstestsuite/tests/ghc-api/exactprint/Test20239.stderr
- testsuite/tests/ghc-api/exactprint/ZeroWidthSemi.hs 8 additions, 0 deletionstestsuite/tests/ghc-api/exactprint/ZeroWidthSemi.hs
- testsuite/tests/ghc-api/exactprint/ZeroWidthSemi.stderr 134 additions, 0 deletionstestsuite/tests/ghc-api/exactprint/ZeroWidthSemi.stderr
- testsuite/tests/ghc-api/exactprint/all.T 1 addition, 0 deletionstestsuite/tests/ghc-api/exactprint/all.T
- testsuite/tests/parser/should_compile/DumpParsedAstComments.stderr 10 additions, 10 deletions.../tests/parser/should_compile/DumpParsedAstComments.stderr
- testsuite/tests/parser/should_compile/T20718.stderr 17 additions, 17 deletionstestsuite/tests/parser/should_compile/T20718.stderr
- testsuite/tests/printer/Test20297.stdout 9 additions, 9 deletionstestsuite/tests/printer/Test20297.stdout
Loading
Please register or sign in to comment