[commit: ghc] master: Fix #line pragmas in nested comments (02518f9)

git at git.haskell.org git at git.haskell.org
Tue Aug 21 22:56:34 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/02518f9d99c2d038384263f9e039efcb09bc96ff/ghc

>---------------------------------------------------------------

commit 02518f9d99c2d038384263f9e039efcb09bc96ff
Author: Ben Sklaroff <bsklaroff at gmail.com>
Date:   Tue Aug 21 12:03:24 2018 -0400

    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


>---------------------------------------------------------------

02518f9d99c2d038384263f9e039efcb09bc96ff
 compiler/parser/Lexer.x                            | 166 +++++++++++++++------
 testsuite/tests/parser/should_fail/all.T           |   3 +-
 testsuite/tests/parser/should_fail/readFail032.hs  |  19 ++-
 .../tests/parser/should_fail/readFail032.stderr    |  13 +-
 testsuite/tests/parser/should_fail/readFail048.hs  |  25 ++++
 .../tests/parser/should_fail/readFail048.stderr    |  11 ++
 utils/haddock                                      |   2 +-
 7 files changed, 180 insertions(+), 59 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 02518f9d99c2d038384263f9e039efcb09bc96ff


More information about the ghc-commits mailing list