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

Change context to pass output mode information to the child parser. #1743

Merged
merged 2 commits into from May 5, 2024

Conversation

kstrohbeck
Copy link
Contributor

Currently, the nom::error::context combinator calls parse on its argument, which forces it to run in streaming mode (as well as making it emit output and errors.) By directly implementing Parser, we can pass the OutputMode information down to the underlying parser.

@kstrohbeck kstrohbeck requested a review from Geal as a code owner April 24, 2024 16:12
Copy link
Collaborator

@Geal Geal left a comment

Choose a reason for hiding this comment

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

great addition, thanks!

Copy link

codspeed-hq bot commented May 5, 2024

CodSpeed Performance Report

Merging #1743 will not alter performance

Comparing kstrohbeck:context-output-mode (b4285d5) with main (1f74da5)

Summary

✅ 24 untouched benchmarks

@coveralls
Copy link

Pull Request Test Coverage Report for Build 8819785900

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 9 of 10 (90.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.03%) to 62.359%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/error.rs 9 10 90.0%
Files with Coverage Reduction New Missed Lines %
src/character/streaming.rs 1 81.56%
src/error.rs 1 17.69%
Totals Coverage Status
Change from base Build 8774369354: 0.03%
Covered Lines: 1829
Relevant Lines: 2933

💛 - Coveralls

Copy link

codecov bot commented May 5, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 62.11%. Comparing base (1f74da5) to head (b4285d5).

Files Patch % Lines
src/error.rs 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1743      +/-   ##
==========================================
+ Coverage   62.05%   62.11%   +0.06%     
==========================================
  Files          24       24              
  Lines        2917     2922       +5     
==========================================
+ Hits         1810     1815       +5     
  Misses       1107     1107              

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

@Geal Geal merged commit cea6595 into rust-bakery:main May 5, 2024
18 checks passed
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