☂️ Transpiler / Transformer
Boshen opened this issue · comments
Boshen commented
Contribution Instructions
The implementation is in crates/oxc_transformer
.
To get started, take a look at the previous implementations.
The integrations tests are located in tasks/transform_conformance/src/lib.rs
,
Run it with just watch 'run -p oxc_transform_conformance'
or with a filter just watch "run -p oxc_transform_conformance -- --filter type-arguments"
.
Tasks
- #979
- #1001
- #999
- Fix transformer benchmark because it is transforming the already transformed AST #998
Third Party Plugins
Feature list
Legend:
- [Syntax] means this is a syntax plugin, no code is required because it is supported by the parser.
- [Regex] means this is a regex transform, which is not supported.
- [Codegen] means the code generator is responsible for the feature.
@babel/preset-react
- @babel/plugin-transform-react-jsx
@babel/preset-typescript
- @babel/plugin-transform-typescript
@babel/preset-env
ES2024
- [Regex] unicode-sets-regex
ES2023
Does not have any features.
ES2022
- class-properties
- class-static-block #962
- private-methods
- private-property-in-object
- [Syntax] syntax-top-level-await
ES2021
- logical-assignment-operators #923
- [Syntax] numeric-separator
ES2020
- dynamic-import
- export-namespace-from
- nullish-coalescing-operator #1004
- optional-chaining
- [Syntax] syntax-bigint
- [Syntax] syntax-dynamic-import
- [Syntax] syntax-import-meta
ES2019
- optional-catch-binding
- [Codegen] json-strings
ES2018
- async-generator-functions
- object-rest-spread
- [Regex] unicode-property-regex
- [Regex] dotall-regex
- [Regex] named-capturing-groups-regex
ES2017
- async-to-generator
ES2016
- exponentiation-operator #996
ES2015
Boshen commented
I'm going to start with https://github.com/babel/babel/blob/main/packages/babel-plugin-transform-nullish-coalescing-operator/src/index.ts
, which is simple but requires adding new variables to the scope.