swc/crates/swc_css_parser
Alexander Akait d8936ade5b
fix(css/parser): Avoid skipping extra whitespaces (#6592)
**Description:**

 - Avoid skipping whitespaces in `[`/`(`/`{` because it is invalid. Whitespaces can be allowed and can be disallowed based on context, we can't apply this logic to any CSS context.
 - Also, we already skip whitespaces where it is necessary.
 - This also avoids extra actions.
2022-12-07 03:44:36 +00:00
..
benches chore(css/lexer): Fix typo (#6588) 2022-12-07 00:59:29 +00:00
scripts/instruemnt perf(css/parser): Reduce clones and allocations (#6585) 2022-12-06 14:27:45 +00:00
src fix(css/parser): Avoid skipping extra whitespaces (#6592) 2022-12-07 03:44:36 +00:00
tests perf(css/parser): Reduce number of function calls (#6587) 2022-12-07 01:45:03 +00:00
Cargo.toml chore: Publish crates 2022-12-07 02:58:32 +00:00
README.md chore(*): Typo + fomatting (#4304) 2022-04-11 18:45:58 +00:00

swc_css_parser

CSS parser for the SWC project

Structure

tests

/tests/fuxture

CSS -> Parsed ast -> JSON.

/tests/error

Error reporting test.

/tests/identity

These tests ensure that input.css and input.explicit.css is parsed identically. These are copied from esbuild, by modifying the test suite.

The name of a test is base64_url(md5(name)).

License

Apache 2.0 / MIT, at your option.

Lots of tests are copied from rome tools and esbuild. If you want to use tests, please consult license of those libraries.