Commit 6c76f0a
authored
feat(es/minifier): Support BinaryExpression for Evaluator (#11390)
**Description:**
Improve Evaluator for `@swc/plugin-formatjs` usage.
- Support evaluate BinaryExpression.
- Add public functions store and resolve_identifier.
- Make `eval_as_expr` a public function.
**Related issue:**
ref: swc-project/plugins#5671 parent ee40804 commit 6c76f0a
File tree
3 files changed
+55
-6
lines changed- .changeset
- crates/swc_ecma_minifier
- src
- tests
3 files changed
+55
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
103 | 116 | | |
104 | 117 | | |
105 | 118 | | |
| |||
185 | 198 | | |
186 | 199 | | |
187 | 200 | | |
188 | | - | |
| 201 | + | |
189 | 202 | | |
190 | | - | |
191 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
192 | 219 | | |
193 | | - | |
194 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
195 | 227 | | |
196 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
197 | 237 | | |
198 | 238 | | |
| 239 | + | |
| 240 | + | |
199 | 241 | | |
200 | 242 | | |
201 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
0 commit comments