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

Improve error reporting for rep0, repAs0 #396

Merged
merged 2 commits into from
Mar 28, 2022
Merged

Conversation

johnynek
Copy link
Collaborator

give rep0/repAs0 the same treatment as #389

@johnynek
Copy link
Collaborator Author

cc @carueda

@codecov-commenter
Copy link

codecov-commenter commented Mar 27, 2022

Codecov Report

Merging #396 (615c6b6) into main (c52f1f6) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #396      +/-   ##
==========================================
- Coverage   96.65%   96.63%   -0.02%     
==========================================
  Files           9        9              
  Lines        1284     1278       -6     
  Branches      124      115       -9     
==========================================
- Hits         1241     1235       -6     
  Misses         43       43              
Impacted Files Coverage Δ
core/shared/src/main/scala/cats/parse/Parser.scala 96.31% <100.00%> (-0.12%) ⬇️
...shared/src/main/scala/cats/parse/Accumulator.scala 100.00% <0.00%> (+2.43%) ⬆️

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 c52f1f6...615c6b6. Read the comment docs.

@@ -2952,22 +2959,6 @@ object Parser {
}
}

case class Rep0[A, B](p1: Parser[A], maxMinusOne: Int, acc: Accumulator0[A, B])
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

in the presence of the a.? ~ b optimization, if we want consistency, it is better to just remove Rep0 entirely and represent it in the same way so we don't have any chance of breaking the symmetry there.

@johnynek johnynek merged commit bfa5224 into main Mar 28, 2022
@johnynek johnynek deleted the oscar/rep0_error_reporting branch March 28, 2022 16:24
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.

3 participants