oxc/crates/oxc_codegen
IWANABETHATGUY b7db235065
fix: comments gen regression (#5003)
try to fix: https://github.com/rolldown/rolldown/issues/2013
1. Before we only considering the ast is untouched, but considering the
scenario.
```js

const a = /*__PURE__*/ test(),
//    ^^^              ^^^^^^ is removed during transform
	b = a();

```
Then according to the previous algorithm, `PURE` will attach to `b =
a()`
2. Now, we try to attach comments as much as possible unless the
comments are separated by comments, for the case above, `PURE` will not
be attached to `a()` since the content between `b = a()` and `/*
__PURE__*/` is not all whitespace.
3. we added back `MoveMap`, for the special case 
```js
/*__NODE_SIDE_EFFECTS__*/ export const c = 100;
// ^^^^^^^^^^^^^^^^^^^^^         should be attached to first declarator,
//                        ^^^^^^ are not whitespace

```
2024-08-20 18:57:12 +08:00
..
examples feat(codegen)!: remove const generic MINIFY (#5001) 2024-08-20 08:13:27 +00:00
src fix: comments gen regression (#5003) 2024-08-20 18:57:12 +08:00
tests/integration feat(codegen)!: remove const generic MINIFY (#5001) 2024-08-20 08:13:27 +00:00
Cargo.toml fix: comments gen regression (#5003) 2024-08-20 18:57:12 +08:00
CHANGELOG.md Release crates v0.24.3 (#4950) 2024-08-18 14:16:25 +08:00