Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Comments right before a if/while/... statement are restored twice and messily  #2

@fflorent

Description

@fflorent

The two lines below (with the comment):

// restored twice and messily
if (document.querySelector("p").textContent=.replace("foo", "bar"));

Are compiled to:

if (function () {
        var lhsContext    // restored twice and messily
 = // restored twice and messily
        document.querySelector('p');
        return lhsContext.textContent = lhsContext.textContent.replace('foo', 'bar');
    }());

(demo)
Florent

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions