Skip to content

syntax: IsIncomplete only works with Interactive #937

Closed

Description

@mvdan

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.

Activity

  1. mvdan commented on Feb 23, 2025

    @mvdan
    OwnerAuthor

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

  2. added a commit that references this issue on Feb 24, 2025
    cbc2c7b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址