oxc/crates/oxc_codegen/src
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
..
annotation_comment.rs fix: comments gen regression (#5003) 2024-08-20 18:57:12 +08:00
binary_expr_visitor.rs feat(codegen)!: remove const generic MINIFY (#5001) 2024-08-20 08:13:27 +00:00
context.rs feat(codegen): align operator precedence with esbuild (#4509) 2024-07-28 11:48:51 +00:00
gen.rs fix: comments gen regression (#5003) 2024-08-20 18:57:12 +08:00
lib.rs fix: comments gen regression (#5003) 2024-08-20 18:57:12 +08:00
operator.rs feat(codegen): move minifying printer to codegen crate (#985) 2023-10-12 14:56:30 +08:00
sourcemap_builder.rs perf(codegen): reduce size of LineOffsetTable (#4643) 2024-08-06 01:08:12 +00:00