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

Add NodeName::Block #11

Merged
merged 5 commits into from
Jan 4, 2021
Merged

Add NodeName::Block #11

merged 5 commits into from
Jan 4, 2021

Conversation

gbj
Copy link
Contributor

@gbj gbj commented Jan 3, 2021

It was startling that it was so easy to do this, but it passes tests, and actually works as I was hoping it would work in the library I'm building.

Open question how NodeName::Block should impl Display but it returns None for .name_as_string() so maybe it's not a big deal one way or the other.

Copy link
Owner

@stoically stoically left a comment

Choose a reason for hiding this comment

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

Thanks for working on this, looks good!

Would be nice if you could document that feature in the README as well (top of the arbitrary rust code block list).

src/node.rs Show resolved Hide resolved
src/node.rs Outdated Show resolved Hide resolved
src/node.rs Outdated Show resolved Hide resolved
src/node.rs Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@stoically
Copy link
Owner

Rebasing on main should also fix the bench CI check

@codecov-io
Copy link

Codecov Report

Merging #11 (97eda59) into main (4db8ff9) will decrease coverage by 0.18%.
The diff coverage is 79.16%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #11      +/-   ##
==========================================
- Coverage   82.91%   82.73%   -0.19%     
==========================================
  Files           4        4              
  Lines         474      498      +24     
==========================================
+ Hits          393      412      +19     
- Misses         81       86       +5     
Impacted Files Coverage Δ
src/node.rs 36.58% <54.54%> (+2.78%) ⬆️
src/parser.rs 91.63% <100.00%> (+0.14%) ⬆️
tests/test.rs 97.14% <100.00%> (+0.23%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4db8ff9...97eda59. Read the comment docs.

@gbj
Copy link
Contributor Author

gbj commented Jan 3, 2021

Sorry for the mess, Git is definitely not my strength; but I think this fixes those conflicts.

Copy link
Owner

@stoically stoically left a comment

Choose a reason for hiding this comment

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

No worries, looks good now, thanks!

@stoically stoically merged commit bd88b3b into stoically:main Jan 4, 2021
@@ -144,6 +153,9 @@ pub enum NodeName {

/// Name separated by colons, e.g. `<div on:click={foo} />`
Colon(Punctuated<Ident, Colon>),

/// Arbitrary rust code in braced `{}` blocks
Block(Expr),
Copy link
Owner

Choose a reason for hiding this comment

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

Just realized, is there a specific reason that this is Expr and not ExprBlock?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants