Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(css_parser): CSS Parser pseudo element selector #268 #600

Merged
merged 10 commits into from
Oct 30, 2023

Conversation

denbezrukov
Copy link
Contributor

@denbezrukov denbezrukov commented Oct 25, 2023

Summary

Change part and highlight syntax, they have identifies as a parameter:
https://developer.mozilla.org/en-US/docs/Web/CSS/::part
https://developer.mozilla.org/en-US/docs/Web/CSS/::highlight

Test Plan

cargo test

@github-actions github-actions bot added A-Parser Area: parser A-Tooling Area: internal tools L-CSS Language: CSS labels Oct 25, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 25, 2023

Parser conformance results on

js/262

Test result main count This PR count Difference
Total 49701 49701 0
Passed 48720 48720 0
Failed 981 981 0
Panics 0 0 0
Coverage 98.03% 98.03% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 40 40 0
Passed 37 37 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.50% 92.50% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 6322 6322 0
Passed 2036 2036 0
Failed 4286 4286 0
Panics 0 0 0
Coverage 32.20% 32.20% 0.00%

ts/babel

Test result main count This PR count Difference
Total 662 662 0
Passed 592 592 0
Failed 70 70 0
Panics 0 0 0
Coverage 89.43% 89.43% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 17646 17646 0
Passed 13454 13454 0
Failed 4190 4190 0
Panics 2 2 0
Coverage 76.24% 76.24% 0.00%

@denbezrukov denbezrukov temporarily deployed to Website deployment October 25, 2023 20:41 — with GitHub Actions Inactive
@denbezrukov
Copy link
Contributor Author

I'm not sure if it is the best way how to handle it.
Because now we have an invariant over a parameter and we have to unwrap it for cases where an identifier is invalid.
We can try to introduce more a comprehensive syntax for part and highlight.
what do you think?

@ematipico
Copy link
Member

I'm not sure if it is the best way how to handle it. Because now we have an invariant over a parameter and we have to unwrap it for cases where an identifier is invalid. We can try to introduce more a comprehensive syntax for part and highlight. what do you think?

Having worked on a CSS parser before, I know their grammar is very strict, and most of the time they apply rules to very specific parts of the grammar, e.g. calc, which is a function but it has very strict rules about what's inside it

My gut feeling tells me that we should implement specific grammar/parsing whenever we can, and try to avoid applying "generic" functions/nodes/patterns whenever we can.

@denbezrukov denbezrukov temporarily deployed to Website deployment October 29, 2023 20:37 — with GitHub Actions Inactive
@denbezrukov denbezrukov temporarily deployed to Website deployment October 29, 2023 20:50 — with GitHub Actions Inactive
@denbezrukov denbezrukov merged commit f58df06 into main Oct 30, 2023
16 checks passed
@denbezrukov denbezrukov deleted the feat/pseudo-part-element branch October 30, 2023 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Parser Area: parser A-Tooling Area: internal tools L-CSS Language: CSS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants