mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
Remove error handling for dbg in expression position
This commit is contained in:
parent
9dae102603
commit
2242e9b2c3
2 changed files with 0 additions and 35 deletions
|
@ -5760,28 +5760,6 @@ mod test_reporting {
|
|||
"#
|
||||
);
|
||||
|
||||
test_report!(
|
||||
dbg_without_final_expression,
|
||||
indoc!(
|
||||
r"
|
||||
dbg 42
|
||||
"
|
||||
),
|
||||
@r#"
|
||||
── INDENT ENDS AFTER EXPRESSION in tmp/dbg_without_final_expression/Test.roc ───
|
||||
|
||||
I am partway through parsing a dbg statement, but I got stuck here:
|
||||
|
||||
4│ dbg 42
|
||||
^
|
||||
|
||||
I was expecting a final expression, like so
|
||||
|
||||
dbg 42
|
||||
"done"
|
||||
"#
|
||||
);
|
||||
|
||||
test_report!(
|
||||
expect_without_final_expression,
|
||||
indoc!(
|
||||
|
|
|
@ -601,19 +601,6 @@ fn to_expr_report<'a>(
|
|||
alloc.region_with_subregion(lines.convert_region(surroundings), region, severity);
|
||||
|
||||
let doc = match context {
|
||||
Context::InNode(Node::Dbg, _) => alloc.stack([
|
||||
alloc.reflow(
|
||||
r"I am partway through parsing a dbg statement, but I got stuck here:",
|
||||
),
|
||||
snippet,
|
||||
alloc.stack([
|
||||
alloc.reflow(r"I was expecting a final expression, like so"),
|
||||
alloc.vcat([
|
||||
alloc.parser_suggestion("dbg 42").indent(4),
|
||||
alloc.parser_suggestion("\"done\"").indent(4),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
Context::InNode(Node::Expect, _) => alloc.stack([
|
||||
alloc.reflow(
|
||||
r"I am partway through parsing an expect statement, but I got stuck here:",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue