Skip to content

Commit

Permalink
Add review comments for parser
Browse files Browse the repository at this point in the history
  • Loading branch information
martindisch committed Jul 19, 2024
1 parent 06916ee commit e344732
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/yak-swc/css_in_js_parser/src/parse_css.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use serde_repr::*;

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ParserState {
pub is_inside_string: Option<char>,
pub is_inside_string: Option<char>, // TODO: enum
pub current_comment_state: CommentStateType,
pub is_inside_property_value: bool,
pub is_inside_at_rule: bool,
Expand Down Expand Up @@ -123,6 +123,7 @@ pub fn parse_css(
back_slashes = 0;
}

// TODO: Consider resetting backslashes
match state.current_comment_state {
// Parse until the end of the current multi line comment is reached
CommentStateType::MultiLine => {
Expand Down
1 change: 1 addition & 0 deletions packages/yak-swc/css_in_js_parser/src/to_css.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pub fn to_css(declarations: &[Declaration]) -> String {
css
}

// TODO: remove
pub fn to_css_with_state(
declarations: &[Declaration],
parser_state: Option<ParserState>,
Expand Down

0 comments on commit e344732

Please sign in to comment.