Commit Graph

25 Commits

Author SHA1 Message Date
Alexander Akait
5234530cd5
fix(css/ast): Use correct type for units (#2464) 2021-10-19 17:32:59 +09:00
Donny/강동윤
9ba68c6863
fix(common): Fix sourcemap (#2457)
swc_common:
 - Include the index to the name in `mappings` of a sourcemap.

swc:
 - Fix handling of `inputSourceMap`.
2021-10-18 06:43:59 +00:00
Alexander Akait
4f2dbd816c
fix(css/parser): Fix parsing of numbers (#2444) 2021-10-17 23:24:28 +09:00
Donny/강동윤
7f04ef4715
feat(css/parser): Allow invalid line comments (#2443)
swc_css_parser:
 - Accept line comments with an option.
2021-10-15 23:21:33 +09:00
Alexander Akait
c2ce89c0fb
feat(css): Add BadUrl token (#2426)
swc_css_ast:
 - Add `BadUrl` to `Token`.

swc_css_parser:
 - Implement error recovery for bad urls.
2021-10-15 22:36:54 +09:00
Alexander Akait
93a7a17472
refactor(css/ast): use delim token (#2425) 2021-10-15 04:46:47 +09:00
Alexander Akait
e2e4f2f64f
fix(css/ast): Fix delimiter token (#2415) 2021-10-14 13:22:51 +09:00
Alexander Akait
fb4869f413
feat(css/ast): Add delim token (#2398) 2021-10-12 20:47:17 +09:00
Alexander Akait
2678c34488
feat(css/ast): Add raw to Url (#2389) 2021-10-11 12:33:11 +09:00
Alexander Akait
a5592e3207
feat(css/ast): Add raw to Str (#2295) 2021-10-10 10:43:11 +09:00
Alexander Akait
cf1235ece1
fix(css): Change the type of the source of @import rules. (#2363) 2021-10-08 20:55:19 +09:00
Alexander Akait
4ff1b7568c
feat(css/ast): Add raw to Text (#2361) 2021-10-07 20:32:54 +09:00
Donny/강동윤
3714802bd3
feat(css): Add error recovery for tokens in selector positions (#2357)
swc_css_ast:
 - Add `Rule::Invalid`.
 
swc_css_parser:
 - Add error recovery for tokens in selector positions.
 - Report an error while recovering property errors.
2021-10-06 09:25:05 +00:00
Donny/강동윤
ce40ff73a7
feat(css/parser): Implement more error recovery (#2316)
swc_css_parser:
 - Recover from wrong properties like `flex-basis: __styled-jsx-placeholder__2%;`.
2021-09-29 05:38:49 +00:00
Donny/강동윤
36c83127e8
fix(css): Reexport codegen from swc_css (#2314)
swc_css:
 - Reexport `swc_css_codegen`.
2021-09-28 13:32:35 +00:00
Donny/강동윤
b206404d94
feat(css): Recover from invalid properties (#2312)
swc_css_ast:
 - Add `DeclBlockItem`.
 - Change `DeclBlock.properties` to `DeclBlock.items`.

swc_css_parser:
 - Add a way to recovered errors.
2021-09-28 09:58:56 +00:00
Donny/강동윤
650e1494d4
fix: Migrate dependencies (#2307)
*:
 - Migrate from `log` to `tracing`. (#2284)
 - Migrate from `fxhash` to `rustc-hash`.

swc_common:
 - Add a cargo feature named `debug`.
2021-09-27 09:19:15 +00:00
강동윤
a9573b9a5f
fix(css/parser): Fix parsing of selectors (#2221)
swc_css_parser:
 - Allow parsing `foo` as selector.
2021-09-09 05:36:56 +00:00
강동윤
d8ae4c4e90
fix(css/parser): Fix parsing of selectors (#2217)
swc_css_parser:
 - Remove `Parse<CompoundSelector>` implementation.
 - Add `Parse<ComplexSelector>` implementation.
 - Add `Parse<Vec<ComplexSelector>>` implementation.
 - Verify tokens input.
2021-09-08 01:19:14 +00:00
Kitson Kelly
87f30b21a3
feat(common): Add variants to FileName (#2202) 2021-09-03 13:55:31 +09:00
강동윤
a8cb554be5
feat: Expose .take() (#2190)
swc_common:
 - Add `Take`. (#2189)

swc_ecma_ast:
 - Implement `Take` for ast nodes. 

swc_ecma_transforms_base:
 - Remove `MapWithMut`.
2021-08-31 14:45:48 +00:00
강동윤
c05a724d84
feat(css): Port stylis (#2131)
swc_css_ast:
 - Add `Value::Comma`.

swc_css_parser:
 - Implement more `Parse<T>`.
 - Fix parsing of values separated with comma.

swc_css_codegen:
 - Fix escaping.
 - Fix codegen of `!important`.

swc_stylis:
 - Port prefixer.
2021-08-23 12:42:13 +00:00
강동윤
7381644f6b
feat(css): Implement codegen for css (#2115)
swc_css_ast:
 - Remove unused tokens.
 - `SubclassSelector::PseudoClass` => `SubclassSelector::Pseudo`.
 - Fix `AttrSelectorOp`
 - `AttrSelector.value`: `Option<Text>` => `Option<Str>`.

swc_css_codegen:
 - Implement a code generator.

swc_css_parser:
 - Implement `Parse<Stylesheet>` for the parser.
 - Fix parsing of pseudo selectors.
 - Fix parsing of unknown at-rules.
2021-08-20 12:38:15 +00:00
강동윤
0d63470eba
feat(css): Groundwork for css processor (#2105)
swc_css_ast:
 - Rename `Values` to `SpaceValues`.

swc_css_parser:
 - Add `parse_str`.
 - Make `ErrorKind` `#[non_exhaustive]`.
 - Fix span.

swc_css_visit:
 - Create visitors.
2021-08-20 07:48:08 +00:00
강동윤
d39acd1d11
feat(css): Implement parser (#2074) 2021-08-19 05:16:32 +00:00