Skip to content

wrong comment.start position #7150

@lukeed

Description

@lukeed

The OXC comment locations are off. It sets start as the index of the begin-comment syntax; eg; after // or /* or /** .

For the example below, OXC reports:

  1. range [2, 14] with value=" hello world"
  2. range [53, 63] with value="* another "

And Babel reports:

  1. [0, 14] with value=" hello world"
  2. [51, 65] with value="* another "
    Note that OXC end index is incorrect for Block comments too, despite matching value.

OXC

Babel Playground

Metadata

Metadata

Assignees

Labels

C-bugCategory - Bug

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions