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

Remove OK code when sentinel is matched #142

Merged
merged 2 commits into from
Oct 25, 2022
Merged

Remove OK code when sentinel is matched #142

merged 2 commits into from
Oct 25, 2022

Conversation

quinnj
Copy link
Member

@quinnj quinnj commented Oct 25, 2022

This broke the InlineStrings tests. Regardless of greedy or non-greedy, we want to remove the OK code, since that should be mutually exclusive with the SENTINEL code.

This broke the InlineStrings tests. Regardless of greedy or non-greedy,
we want to remove the OK code, since that should be mutually exclusive
with the SENTINEL code.
@codecov
Copy link

codecov bot commented Oct 25, 2022

Codecov Report

Base: 90.98% // Head: 90.98% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (fed4606) compared to base (388613c).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #142   +/-   ##
=======================================
  Coverage   90.98%   90.98%           
=======================================
  Files           9        9           
  Lines        1608     1609    +1     
=======================================
+ Hits         1463     1464    +1     
  Misses        145      145           
Impacted Files Coverage Δ
src/components.jl 99.16% <100.00%> (+<0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@nickrobinson251 nickrobinson251 left a comment

Choose a reason for hiding this comment

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

Thanks!

I'm surprised the existing tests here in Parsers.jl did't catch this -- let's add one?

This fails on main but passes with this fix:

# #140, #142 
res = Parsers.xparse(String, "NA"; sentinel=["NA"])
@test res.code == (SENTINEL | EOF)

@quinnj quinnj merged commit 3136584 into main Oct 25, 2022
@quinnj quinnj deleted the jq/fix_sentinel branch October 25, 2022 21:35
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

2 participants