Skip to content

Labels don't show unless the EOI is in it's place #631

@mnbjhu

Description

@mnbjhu

Suppose I have the following parser:

    let ident = select! {
        Token::Ident(ident) => ident,
    };
    just(Token::Keyword(Keyword::Select))
        .ignore_then(ident.labelled("column"))
        .then_ignore(just(Token::Keyword(Keyword::From)))
        .then(ident.labelled("table"))
        .map(|(column, from)| Statement::Select(Select { column, from }))

When I parse this input:

(Keyword(Select), 0..6)
(Ident("some"), 7..11)
(Keyword(From), 12..16)
(Newline, 16..17)

Then I get an error: 'found newline expected something else'. However if I use:

(Keyword(Select), 0..6)
(Ident("some"), 7..11)
(Keyword(From), 12..16)

Then I get the error: 'found end of input expected table' which is what I'd expect. Is this a bug or am I missing something? (1.0.0-alpha.7)

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