diff --git a/crates/parser/src/grammar/expressions.rs b/crates/parser/src/grammar/expressions.rs index 5a0ac0ad58..746821aac4 100644 --- a/crates/parser/src/grammar/expressions.rs +++ b/crates/parser/src/grammar/expressions.rs @@ -454,7 +454,12 @@ fn infix_op( if let Expr::Name(name) = func.kind { Node::new(name, func.span) } else { - panic!("shit") + par.fancy_error( + "failed to parse attribute expression", + vec![Label::primary(func.span, "expected a name")], + vec![], + ); + return Err(ParseFailed); } }, }, @@ -471,7 +476,6 @@ fn infix_op( ) } _ => { - // panic!("shit"); par.fancy_error( "failed to parse attribute expression", vec![Label::primary(right.span, "expected a name")],