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

internal: Try adding a label to a chumsky parser #4705

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion prqlc/prqlc-parser/src/parser/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub fn keyword(kw: &'static str) -> impl Parser<TokenKind, (), Error = PError> +
}

pub fn new_line() -> impl Parser<TokenKind, (), Error = PError> + Clone {
just(TokenKind::NewLine).ignored()
just(TokenKind::NewLine).ignored().labelled("new line")
}

pub fn ctrl(char: char) -> impl Parser<TokenKind, (), Error = PError> + Clone {
Expand Down
2 changes: 1 addition & 1 deletion prqlc/prqlc-parser/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fn test_error_unexpected() {
0:6-7,
),
reason: Simple(
"unexpected : while parsing function call",
"unexpected :",
),
hints: [],
code: None,
Expand Down
2 changes: 1 addition & 1 deletion prqlc/prqlc/tests/integration/error_messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ fn test_errors() {
1 │ Answer: T-H-A-T!
│ ┬
│ ╰── unexpected : while parsing function call
│ ╰── unexpected :
───╯
"###);
}
Expand Down