Commit Graph

53 Commits

Author SHA1 Message Date
Alexander Akait
6ae3af3673
feat(css/ast): Add nested selector (#2641) 2021-11-06 16:58:41 +00:00
Alexander Akait
c361982963
refactor(css/ast): Rename NamespacedName to TypeSelector (#2642) 2021-11-06 16:01:50 +00:00
Alexander Akait
a8e4c72f33
fix(css/parser): Exclude whitespace from span (#2659) 2021-11-06 09:32:24 +00:00
Alexander Akait
20f4e2148c
refactor(css/ast): Use names from specification for ast types (#2643)
swc_css_ast:
 - Rename `AttrSelectorOp` to `AttrSelectorMatcher`.
2021-11-05 11:42:51 +00:00
Alexander Akait
0b76d29ae4
feat(css/ast): Add SelectorList (#2639)
swc_css_ast:
 - Add `SelectorLsit`.
 - Use `SelectorList` instead of `Vec<ComplexSelector>`.
2021-11-04 09:54:55 +00:00
Alexander Akait
8c61d0d609
feat(css/ast): Add RoundBracketBlock to Value (#2618) 2021-11-04 12:05:29 +09:00
Alexander Akait
cc5398b1a6
refactor(css/parser): Refactor parser for at rules (#2617)
swc_css_ast:
 - Move some at-rules to own files.

swc_css_parser:
 - Implement `Parse` for more types.
2021-11-02 11:13:23 +00:00
Alexander Akait
c89a9ea171
fix(css/lexer): Fix some edge cases (#2612) 2021-11-02 05:28:19 +00:00
Alexander Akait
b806551ade
refactor(css/lexer): Refactor lexer to follow spec (#2593) 2021-11-01 16:53:26 +09:00
Alexander Akait
f77d6ceb00
feat(css/ast): Add SquareBracketBlock (#2573) 2021-10-30 14:53:11 +09:00
Alexander Akait
47f7f1ad4f
fix(css/parser): Resolve some TODOs (#2572) 2021-10-29 19:55:02 +09:00
Alexander Akait
67c0d4cc37
feat(css/parser): Use Function token. (#2571) 2021-10-29 17:48:04 +09:00
Alexander Akait
4f0473616d
feat(css/ast): Add value to the whitespace token (#2533) 2021-10-28 23:48:31 +09:00
Donny/강동윤
7e29685a17
chore: Fix failing tests and improve CI scripts (#2563) 2021-10-28 02:55:49 +00:00
Alexander Akait
303cecbefc
feat(css/ast): Add raw to the hash value (#2535) 2021-10-27 23:15:11 +09:00
Alexander Akait
0e458778ec
refactor(css/ast): Rename types (#2532) 2021-10-27 03:38:05 +09:00
Alexander Akait
6876b1b26c
refactor(css/parser): Fix parsing of some selectors (#2525)
swc_css_parser:
 - Fix whitespace bugs related to parsing of attribute selectors.
 - Fix bugs related to empty namespace selectors.
2021-10-25 23:48:56 +09:00
Alexander Akait
e327c9a502
feat(css/ast): Add Percent token (#2482) 2021-10-22 13:35:29 +09:00
Alexander Akait
d83bde8ca5
fix(css/parser): Fix parsing of url (#2484) 2021-10-20 15:39:01 +09:00
Alexander Akait
b62dc60c5d
feat(css/ast): Add Function token (#2491) 2021-10-20 04:53:08 +09:00
Alexander Akait
5234530cd5
fix(css/ast): Use correct type for units (#2464) 2021-10-19 17:32:59 +09: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
f7b065ef0b
fix(css/parser): Fix parsing of comments (#2414) 2021-10-13 20:48:15 +09:00
Alexander Akait
fb4869f413
feat(css/ast): Add delim token (#2398) 2021-10-12 20:47:17 +09:00
Alexander Akait
a36f8e42bd
test(css/parser): Add tests for comments (#2364) 2021-10-12 02:08:23 +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
Alexander Akait
1e9ecfbad1
test(css/parser): Add tests for hex colors (#2360) 2021-10-07 15:14:11 +09:00
Alexander Akait
f0be833f14
test(css/parser): Combinators (#2359) 2021-10-07 00:32:31 +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
Alexander Akait
6863d9624e
fix(css/parser): Fix parsing of funxtion named url (#2350)
swc_css_parser:
 - Make `url` function calls to not contain space in arguments.
2021-10-06 04:39:54 +09:00
Donny/강동윤
9f4c5b7ba5
fix(css/parser): Fix error recovery logic of property values (#2331)
swc_css_parser:
 - Fix `state` used for error recovery.
2021-10-01 11:04:24 +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/강동윤
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
Alexander Akait
8af2173a33
test(css/parser): Add tests for comments in selectors (#2293) 2021-09-24 17:09:57 +09:00
Alexander Akait
2a565e8464
test(css/parser): Add tests for @page at-rule (#2296) 2021-09-24 16:12:08 +09:00
Alexander Akait
75c930caf1
fix(css/ast): Fix typo (#2298) 2021-09-24 15:48:31 +09:00
Alexander Akait
2f4da9a8ff
fix(css/parser): Fix parsing of !important (#2286) 2021-09-23 20:50:16 +09:00
Alexander Akait
b5ad03d0b1
fix(css/parser): Fix parsing of url (#2280)
swc_css_parser:
 - Fix parsing of url values with space.
2021-09-21 23:52:28 +09:00
Alexander Akait
9eb45e8515
fix(css/parser): Allow @at-rules to be lowercased (#2274)
swc_css_parser:
 - Allow lowercase for @at-rules.
2021-09-21 16:55:46 +09: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
강동윤
8c57cf0537
feat(css/parser): Improve parser api (#2147)
swc_css_parser:
 - Add `parse_tokens`.
 - Implement `Parse<CompoundSelector>` for the parser.
2021-08-25 02:46:17 +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