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

fix: add better errors for missing commas in arrays and objects #5079

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

Conversation

TomPridham
Copy link
Contributor

closes #5055
Adds better error messaging for missed commas in objects and arrays and adds the same missing closing bracket message for objects

Screenshot from 2025-01-15 22-55-43
Screenshot from 2025-01-15 22-56-09
Screenshot from 2025-01-15 22-57-51

Copy link

qa-wolf bot commented Jan 16, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

Copy link

vercel bot commented Jan 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Jan 20, 2025 8:50pm

@@ -259,6 +270,14 @@ impl<'a> winnow::stream::StreamIsPartial for TokenSlice<'a> {
}
}

impl<'a> winnow::stream::FindSlice<&str> for TokenSlice<'a> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to implement this to use take_until. I wasn't sure if there was a better way to check and see if there was a closing bracket or not. Using take_till always returned Ok even if the token wasn't present

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.

[CRYPTIC]: Reported error is not helpful for missing comma/parentheses type errors
1 participant