Fix #line pragmas in nested comments
authorBen Sklaroff <bsklaroff@gmail.com>
Tue, 21 Aug 2018 16:03:24 +0000 (12:03 -0400)
committerBen Gamari <ben@smart-cactus.org>
Tue, 21 Aug 2018 22:52:33 +0000 (18:52 -0400)
commit02518f9d99c2d038384263f9e039efcb09bc96ff
tree3e850405fc95c084053c0186031d47defd9f5224
parent966aa7818222a8637b56ca32b3892901de1bf5d4
Fix #line pragmas in nested comments

When parsing a nested comment or nested doc comment in the lexer, if we
see a line starting with '#' we attempt to parse a #line pragma. This
fixes how ghc handles output of the C preproccesor (-cpp flag) when the
original source has C comments or pragmas inside haskell comments.

Updates haddock submodule.

Test Plan: ./validate

Reviewers: bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #314

Differential Revision: https://phabricator.haskell.org/D4934
compiler/parser/Lexer.x
testsuite/tests/parser/should_fail/all.T
testsuite/tests/parser/should_fail/readFail032.hs
testsuite/tests/parser/should_fail/readFail032.stderr
testsuite/tests/parser/should_fail/readFail048.hs [new file with mode: 0644]
testsuite/tests/parser/should_fail/readFail048.stderr [new file with mode: 0644]
utils/haddock