mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
docs(transformer): comment on RegExp transform for potential improvement (#5514)
I think it's correct that we could do better here. Or is there some difference in behavior between `RegExp(...)` and `new RegExp(...)`?
This commit is contained in:
parent
758a10c515
commit
9282647e6c
1 changed files with 4 additions and 0 deletions
|
|
@ -39,6 +39,10 @@
|
|||
//! #### Set notation + properties of strings (`v`)
|
||||
//! - @babel/plugin-transform-unicode-sets-regex: <https://babeljs.io/docs/en/babel-plugin-proposal-unicode-sets-regex>
|
||||
//! - TC39 Proposal: <https://github.com/tc39/proposal-regexp-set-notation>
|
||||
//!
|
||||
//! TODO(improve-on-babel): We could convert to plain `RegExp(...)` instead of `new RegExp(...)`.
|
||||
//! TODO(improve-on-babel): When flags is empty, we could output `RegExp("(?<=x)")` instead of `RegExp("(?<=x)", "")`.
|
||||
//! (actually these would be improvements on ESBuild, not Babel)
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue