Commit Graph

73 Commits

Author SHA1 Message Date
강동윤
8222cc075d
feat(ast_node): Add #[ast_serde] (#1595)
ast_node:
 - Add `#[ast_serde]`.
2021-04-21 09:11:50 +00:00
강동윤
13a9d12c84
chore(ci): Configure github actions for rustdoc (#1523) 2021-03-31 13:09:10 +09:00
강동윤
99f4f0f280
fix(swc): Fix bugs for v1.2.52 (#1506)
swc_ecma_parser:
 - Support `private declare`. (#1503)
 - Recover `backtracking` state while doing some nested backtracking. (#1505)
 - Allow using `readonly` as the name of class properties. (#1514)

swc_ecma_transforms_base:
 - `hygiene`: Keep the name of class expressions. (#1507)

swc_ecma_transforms_typescript:
 - Allow a namespace and a class to have the same name. (#1515)

swc:
 - Disable `tsx` if the ext of a file is ts.
2021-03-29 20:48:48 +09:00
강동윤
c047e0e54d
fix(bundler): Fix bundler (#1427)
swc_bundler:
 - Create variables for export while preparing a module. (denoland/deno#9560)
 - Fix order of statements.
 - Invoke dce multiple time if required. (denoland/deno#9546)

swc_ecma_transforms_optimization:
 - dce: Track modifications correctly.
2021-02-26 18:21:42 +09:00
LongYinan
9d896c746e
feat(node-swc): Reduce binary size (#1418) 2021-02-20 17:07:58 +09:00
Yehuda Katz
db85d123b7
Fix a number of typos (#1412)
Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
2021-02-20 15:18:09 +09:00
강동윤
6984217200
feat(ES/transform/typescript): Support namespace (#1325)
swc_common:
 - Update `serde`.

swc_ecma_transforms_typescript:
 - Add support for namespace.
2021-01-12 21:59:42 +09:00
강동윤
b4de27b377 Publish 2020-12-27 13:17:02 +09:00
강동윤
34249bbf47
feat(ecmascript/ast): Add EqIgnoreSpan and TypeEq (#1295) 2020-12-27 13:11:44 +09:00
강동윤
4490e2551d
swc.rs (#1085)
Changes url from https://swc-project.github.io to https://swc.rs
2020-09-21 22:53:48 +09:00
강동윤
9b8bfb2455
Use stable rustc (#886) 2020-07-24 02:18:22 +09:00
강동윤
135149d6a8 Bump version 2020-07-07 11:54:06 +09:00
강동윤
14f5212d3d
Wasm (#691) 2020-05-07 18:17:57 +09:00
강동윤
ffbb5163aa Bump version 2020-03-06 11:06:45 +09:00
강동윤
88d3062e5d Fix 2020-03-05 11:36:50 +09:00
강동윤
15bef97278
VisitMut<T> and VisitMutwith<F> (#680)
This is a groundwork for dts generator.
2020-02-19 23:13:08 +09:00
강동윤
277d04da4c Fix 2020-01-16 13:53:44 +09:00
강동윤
44ab37b5a1 extern crate proc_macro (Fixes #587) 2020-01-16 13:52:07 +09:00
강동윤
11d056c777
Extract FromVariant (#586)
Move FromVariant to a separate crate
2020-01-15 18:00:08 +09:00
강동윤
332061f44d
Parser: respect jsc.target (#507)
swc:
 - make parser respect `jsc.target`.
2019-12-14 18:51:08 +09:00
Zimon Dai
ec086a1dab use 2018 edition syntax (#479) 2019-12-02 17:10:05 +09:00
강동윤
51558c6c36
Final groundwork for plugin (#474)
swc:
 - add serialization tests

ast_node:
 - handle `*` tag properly

swc_ecma_ast:
 - update serialization of ExprOrSpread
2019-11-30 11:12:34 +09:00
강동윤
a7a8a4a2e4
Plugin (#473)
swc_common:
 - apply patch from rust-lang/rust#59693

swc:
 - use &Options instead of Options
 - configures commons::CM
 - exposes `handler`
2019-11-29 23:46:06 +09:00
강동윤
b46c4ec300
Update dependencies (#464) 2019-11-24 14:17:27 +09:00
Jasper De Sutter
716bfe05b2 Cleanup (#448)
- cargo fix
- update all crates to 2018 edition
2019-11-17 13:21:53 +09:00
강동윤
ae3326cd9d
Compiler apis & .swcrc improvement (#434)
- Expose high-level compiler apis (#431)
 - Support multiple entries in .swcrc (#414)
2019-10-25 10:11:24 +09:00
강동윤
34c3a0ece9 Fix lints 2019-10-19 12:47:25 +09:00
강동윤
9f1fca55ff Update rustc toolchain to nightly-2019-09-30 2019-10-02 13:53:56 +09:00
강동윤
ed64a60cb3 Publish ast / codegen /transforms 2019-05-02 15:50:21 +09:00
강동윤
b44da9dbe4
Fix #369, #370 (#373)
swc_common:
 - don't emit `loc` for dummy spans

swc_ecma_transforms:
 - prevent hygiene from changing key in object pattern (#369)
 - fix module tests (iteration order of FxHashSet is changed)

swc_ecma_parser:
 - fix parsing of arrow function (#370)
2019-04-27 16:28:34 +09:00
강동윤
fbbafc5712 fix lints 2019-04-13 20:55:28 +09:00
강동윤
248a53ce7c
Make deserialization faster (#324)
swc_ecma_ast:
 - make deserialization faster
2019-03-08 11:36:23 +09:00
강동윤
ed100700f1
Make deserialization fast (#314)
swc_ecma_ast:
  - add deserialization benchmark

ast_node:
 - #[ast_node] on enum now implements faster deserialization
2019-03-05 23:16:45 +09:00
강동윤
10cb9a4b21
Publish (#278)
- swc_macros_common@0.2.0
 - ast_node@0.4.1
 - string_enum @0.2.0 
 - swc_ecma_ast@0.8.0
 - swc_ecma_parser_macros@0.3.0
 - swc_ecma_codegen_macros@0.3.0
 - swc_ecma_parser@0.9.1
 - swc_ecma_parser@0.6.1
2019-02-27 10:42:22 +09:00
강동윤
dff2cb8f75
Implement deserialize for ast nodes (#274)
string_enum:
 - #[derive(StringEnum)] now derives `Deserialize`

swc_ecma_ast:
 - implement deserialize for ast nodes.
 - change ast to make it serialized / deserialized correctly

swc_ecma_parser:
 - jsx, test262, typescript tests now verify serialization and deserialization of module
2019-02-24 14:12:04 +09:00
강동윤
c1de0a5c86
Improve codegen of binary expression which contains unary expression. (#267)
swc_ecma_codegen:
 - improve codegen of binary expression which contains unary expression (#266)
2019-02-22 12:04:41 +09:00
강동윤
76ce98b685
Implement serialize for ast nodes (#244)
swc_common:
 - implement Serialize / Deserialize for span

swc_ecma_parser:
 - use json instead of {:#?} while testing
 - update test references
2019-02-20 11:35:41 +09:00
강동윤
b516c19133
Update dependencies (#135) 2019-02-07 00:05:25 +09:00
강동윤
a26cc61a69 Build on stable rust 2019-01-19 09:25:47 +09:00
강동윤
d7ce4d1100 Bump version 2019-01-17 23:19:08 +09:00
강동윤
eebf14fbef
Allow stable rust (#118)
This pr introduces some cargo features. For `swc_common` and `swc_ecma_ast`, it introduces a feature flag `fold`.
`Fold` and `Visit` traits exist only if the feature is enabled.

For `swc_ecma_parser`, flag called `verify` is added. When disabled, we skip checking of validity of some expressions.

e.g. `{foo = bar}`

Verification is disabled by default it requires nightly compiler
2019-01-17 23:17:16 +09:00
강동윤
77e3a78353 Make procmacro2_semver_exempt optional 2019-01-15 13:29:57 +09:00
강동윤
fc3a9d6180
.swcrc file for configuration (#115)
libswc:
 - use config file
2019-01-08 16:34:35 +09:00
강동윤
ea610c6ded
Typescript & parser for decorators
swc_atoms:
 - add some atoms

swc_ecma_ast:
 - ast nodes for typescript
 - `ClassMethod` -> `Method`, `ClassMethodKind` -> `MethodKind`
 - private class method / class property
 - use separate type for tagged template literals
 - add `declare` field to `Decl`s
 - make function body optional

swc_ecma_parser:
 - rename Type to TokenContext
 - support decorators
 Note: error reporting for invalid decorator is not implemented yet
 - merge `Config` into `Syntax`
 - Use DiagnosticBuilder for error type
This is to make backtracking cheaper.

swc_ecma_transforms:
 - add `strip` pass
2019-01-07 19:43:47 +09:00
강동윤
603b83291d
jsx support (#100)
swc_ecma_parser:
 - implement parser for jsx

swc_ecma_transforms:
 - implement react::jsx transform

swc_ecma_codegen:
 - implement code generator for jsx
2018-12-30 11:57:27 +09:00
강동윤
4ff6d4ed4a
Performance & Node binding (#84)
swc_common:
 - update rustc-ap crates to v313

swc_ecma_ast:
 - use bool instead of Option<Span>


swc_ecma_parser:
 - remove LexerInput
 - use uncons_while
 - assert only on debug mode
 - use Visit instead of Fold while verifying
 - replace debug! with trace!
 - disable logging while benchmarking
 - drop slog

swc_ecma_transforms:
 - classes: fold Decl instead of Stmt

swc:
 - add nodejs binding
2018-12-21 16:54:36 +09:00
강동윤
22b9e08851 Add CONTRIBUTING.md and ARCHITECTURE.md 2018-12-04 15:11:50 +09:00
강동윤
222bdc191f
Performance (#82)
`Map<T>` adds a method named `map` which is actually `Box<T>` -> `Box<T>` without reallocation.

swc_ecma_transforms:
 - chain_at!(Type, passes)
This macro deeply joins path at 'Type' level.
2018-12-01 22:24:26 +09:00
강동윤
84675d32df
Visitor (#69)
* Add Visit<T> and VisitWith<F>

* implement derive(VisitWith<T>)

* Bump versions
2018-11-19 13:02:55 +09:00
강동윤
3786c5f788
Make procmacro2_semver_exempt optional for FromVariant (#68)
- use call_site if cfg(procmacro2_semver_exempt) is false

 - Make `FromVariant` not to emit extern crate swc_common
2018-11-18 21:18:11 +09:00