Skip to content

Document or enforce SourceIterator::consume precondition #186

Description

@timfennis

Problem

SourceIterator::consume panics via expect if asked to consume past the available input. The call sites appear to rely on a lookahead invariant, but that invariant is undocumented and not encoded in the API.

Desired outcome

Either document and assert the invariant clearly, or return an internal error instead of panicking.

Location

ndc_lexer/src/lib.rs, SourceIterator::consume.

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