Bug 156617 - Web Inspector: JS Pretty Printing - Some comments get lost
Summary: Web Inspector: JS Pretty Printing - Some comments get lost
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-04-14 19:29 PDT by Joseph Pecoraro
Modified: 2016-12-13 15:40 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2016-04-14 19:29:03 PDT
* SUMMARY
JS Pretty Printing - Some comments get lost.

* TEST
{
  1;
  // Test
}

* RESULTS
{
    1;

}

* EXPECTED
{
    1;
    // Test
}

* DEBUG
BlockStatement            Punctuator           {
Literal                   Numeric              1
ExpressionStatement       Punctuator           ;
** T Comment (1)          Line                  Test
BlockStatement            Punctuator           }

* NOTES
This is apparently a bad arrangement of Punctuators and Comments which ends up having this comment only as a "Trailing" comment for the Expression and not a "Leading" comment for the block... Not sure where it would be best to handle this comment.
Comment 1 Alexey Proskuryakov 2016-09-08 14:01:22 PDT
<rdar://problem/28213724>