-
-
Notifications
You must be signed in to change notification settings - Fork 521
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(parser): fix
SequenceExpression
span (#9035)
There's a very minor difference in span when `SequenceExpression` has empty spaces right after `(` or before `)`. For example, the following code has a different span/range depending on parsers: ```js ( 1, 2 ) ^^^^ (acorn, swc, babel) ^^^^^^ (oxc, tsc) ``` - oxc https://ast.sxzz.dev/#eNpNijEKgDAQBL9ybKUQBC19gC+wvCbECErMBaOiiH/3Cgu7md25EdBitofNbp3SBoOkg5xOySkVVBtqqFQV1ZsjESPLvjrfX8kzWvVFhj0om//dTcFHu3zJKFJtmcHxwfMCI14kXg== - acorn https://ast.sxzz.dev/#eNotijEOwjAMRa8SeQIpC4w9BQNiymIZD0WpHdlJJVT17hi12/vv/Q0qTPDBFZ1sbh0ytBBIahJMwZd0y+merjE15lYkpQJMC77YfFYpMIWo2Nl7gXx012HEz2/jIy/6HjX4zM3Y2VZ+oLH4/9JtcJEd9h+w8S5G Just for acorn estree conformance sake, I changed a span to match acorn, but I'm not sure if there's any real value in choosing one over another.
- Loading branch information
Showing
2 changed files
with
9 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters