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: Rethink parsing #785

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open

Conversation

Aiving
Copy link
Contributor

@Aiving Aiving commented Jul 13, 2024

No description provided.

@marc2332 marc2332 self-requested a review July 13, 2024 09:24
@marc2332 marc2332 added the enhancement 🔥 New feature or request label Jul 13, 2024
Copy link

codecov bot commented Jul 13, 2024

Codecov Report

Attention: Patch coverage is 82.75418% with 134 lines in your changes missing coverage. Please review.

Project coverage is 75.82%. Comparing base (3078a28) to head (9836be6).

Files with missing lines Patch % Lines
crates/state/src/values/font.rs 34.84% 43 Missing ⚠️
crates/state/src/lexing.rs 83.91% 23 Missing ⚠️
crates/state/src/parsing.rs 85.38% 19 Missing ⚠️
crates/state/src/font_style.rs 30.43% 16 Missing ⚠️
crates/state/src/layout.rs 83.87% 5 Missing ⚠️
crates/state/src/values/size.rs 88.09% 5 Missing ⚠️
crates/state/src/style.rs 42.85% 4 Missing ⚠️
crates/state/src/values/overflow.rs 55.55% 4 Missing ⚠️
crates/state/src/transform.rs 57.14% 3 Missing ⚠️
crates/state/src/values/color.rs 96.51% 3 Missing ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #785      +/-   ##
==========================================
- Coverage   75.99%   75.82%   -0.18%     
==========================================
  Files         207      208       +1     
  Lines       23775    23793      +18     
==========================================
- Hits        18067    18040      -27     
- Misses       5708     5753      +45     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@marc2332 marc2332 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having to write

let mut parser = Parser::new(Lexer::parse(value));

every time in the node states is a step back, why aren't those using parse_value?

crates/state/src/lexing.rs Outdated Show resolved Hide resolved
crates/state/src/lexing.rs Outdated Show resolved Hide resolved
crates/state/src/lexing.rs Outdated Show resolved Hide resolved
crates/state/src/lexing.rs Outdated Show resolved Hide resolved
crates/state/src/lexing.rs Outdated Show resolved Hide resolved
crates/state/src/lexing.rs Outdated Show resolved Hide resolved
crates/state/src/lexing.rs Outdated Show resolved Hide resolved
crates/state/src/lexing.rs Outdated Show resolved Hide resolved
@Aiving
Copy link
Contributor Author

Aiving commented Jul 14, 2024

Having to write

let mut parser = Parser::new(Lexer::parse(value));

every time in the node states is a step back, why aren't those using parse_value?

I forgot to change the node states code when I added the parse_value, will make fix commit soon

replace all Parser::new(...) in node states with Parse::parse_value
@Aiving
Copy link
Contributor Author

Aiving commented Jul 15, 2024

@marc2332 done

crates/state/src/font_style.rs Outdated Show resolved Hide resolved
crates/state/src/values/color.rs Outdated Show resolved Hide resolved
crates/state/src/values/color.rs Outdated Show resolved Hide resolved
crates/state/src/parsing.rs Outdated Show resolved Hide resolved
crates/state/src/parsing.rs Outdated Show resolved Hide resolved
crates/state/src/parsing.rs Outdated Show resolved Hide resolved
crates/state/src/values/color.rs Outdated Show resolved Hide resolved
crates/state/src/lexing.rs Outdated Show resolved Hide resolved
crates/state/src/values/font.rs Outdated Show resolved Hide resolved
@marc2332
Copy link
Owner

Can you make sure that all the examples run just fine @Aiving ?

@marc2332
Copy link
Owner

marc2332 commented Jul 16, 2024

Can you make sure that all the examples run just fine @Aiving ?

You may do this by running the examples.sh script

@Aiving
Copy link
Contributor Author

Aiving commented Jul 16, 2024

Can you make sure that all the examples run just fine @Aiving ?

You may do this by running the examples.sh script

oki, i'll try

crates/state/src/values/font.rs Outdated Show resolved Hide resolved
@marc2332
Copy link
Owner

marc2332 commented Aug 3, 2024

Conflicts @Aiving

@Aiving
Copy link
Contributor Author

Aiving commented Aug 4, 2024

Conflicts @Aiving

resolved!

@marc2332
Copy link
Owner

We need to make sure no example broke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🔥 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants