ApiAnnotations : lexer discards comment close in nested comment
ClosedPublic

Authored by alanz on Apr 9 2015, 5:31 AM.

Details

Summary

When parsing a nested comment, such as

{-

{-  nested comment  -}
{-# nested pragma  #-}

-}

The lexer returns the comment annotation as

{-

{-  nested comment
{-# nested pragma  #

-}

Restore the missing comment end markers in the annotation.

Test Plan

./validate

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
alanz updated this revision to Diff 2708.Apr 9 2015, 5:31 AM
alanz retitled this revision from to ApiAnnotations : lexer discards comment close in nested comment.
alanz updated this object.
alanz edited the test plan for this revision. (Show Details)
alanz added reviewers: hvr, austin.
alanz updated the Trac tickets for this revision.
austin accepted this revision.Apr 14 2015, 1:10 AM
austin edited edge metadata.

I don't think I understand why it had drop 2 in the first place, but nice catch.

This revision is now accepted and ready to land.Apr 14 2015, 1:10 AM
alanz added a comment.Apr 14 2015, 1:21 AM

The 'drop 2' was to strip the comment opening, to match the fact that the
comment closing was stripped originally. Now neither are.

This revision was automatically updated to reflect the committed changes.