-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Parser render module #530
base: main
Are you sure you want to change the base?
Parser render module #530
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
…de on parser since the ast is bonkers
…perty grammar definition
…t the test passes
@@ -542,22 +532,28 @@ let handle_tokenizer_error = lexbuf => { | |||
}; | |||
|
|||
let skip_whitespace = ref(false); | |||
let prev_skip_whitespace = ref(false); |
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.
whoa, I would need an explanation on why previous is needed, when we have skip_ws
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.
If both booleans are needed, I would go with a single ref and a few variants, wdyt?
Inside_media | Inside_selector | Outside_x | etc..
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.
oof forgot to refactor this specific hack hehe.
when we are inside a brace, the skip_whitespace is set to true and the whitespace inside values (<property>
: <values>
) is skipped. i want to enable whitespace when we are seeing :
and bring skip_whitespace to its previous value when we are seeing ;
i like the variant idea though, will try to implement it!
Styled_ppx_css_parser.Parser_location.update_pos_lnum( | ||
at_rule_prelude_loc, | ||
loc, | ||
), |
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.
When have you seen this to be needed? Can add a test for it? ^^
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.
this keeps the cnum of the first location but offset the lnum with the second loc. i've tried using intersection but this seems to work well to highlight the correct error location.
No description provided.