-
-
Notifications
You must be signed in to change notification settings - Fork 495
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: basic class selector parsing #307
Conversation
Parser conformance results onjs/262
jsx/babel
symbols/microsoft
ts/babel
ts/microsoft
|
) | ||
.is_err() | ||
{ | ||
m.abandon(p); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please share your strategy for situations where we might need to abandon and return as absent, rather than completing and returning bogus kind?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a clear strategy in mind yet, but I've had some ideas while starting this work, still it's best if we discuss them.
For rules, I thought we could bogus+recover in the prelude and in the block.
This would allow us to parse cases like:
.foo }
.bar {}
.686 {}
.bar {}
Although, I'm not sure about the prelude of the rule.
Or maybe we should have a big CssBogusRule
? What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you, let's try to use a recovery strategy.
Summary
This PR adds basic parsing of CSS class selector.
I removed some nodes from the grammar because they weren't needed.
Test Plan
Added basic tests