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

syntax: IsIncomplete only works with Interactive #937

Closed
mvdan opened this issue Oct 30, 2022 · 1 comment
Closed

syntax: IsIncomplete only works with Interactive #937

mvdan opened this issue Oct 30, 2022 · 1 comment

Comments

@mvdan
Copy link
Owner

mvdan commented Oct 30, 2022

IsIncomplete reports whether a Parser error could have been avoided with extra input bytes. For example, if an io.EOF was encountered while there was an unclosed quote or parenthesis.

Given this godoc, it seems like it should work with all parse APIs, like Parse or Words, but it does not. For example, see https://go.dev/play/p/DxfQ8ZlBFuF.

We should either make it work everyhwere, or document its limitation. Ideally the former.

@mvdan mvdan closed this as completed in cbc2c7b Feb 23, 2025
@mvdan
Copy link
Owner Author

mvdan commented Feb 23, 2025

cc @diamondburned as I believe you raised this issue via chat originally

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

No branches or pull requests

1 participant