Skip to content

Commit

Permalink
internal: Try adding a label to a chumsky parser
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty committed Jul 8, 2024
1 parent 6545978 commit bc81a75
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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

0 comments on commit bc81a75

Please sign in to comment.