From ffdf0268dd451bbc5bbbda0c6c69e91f2e9174ed Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Fri, 16 May 2025 16:06:35 +0100 Subject: [PATCH] LibWeb/CSS: Make debug messages in parse_simple_selector() more useful --- Libraries/LibWeb/CSS/Parser/SelectorParsing.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/LibWeb/CSS/Parser/SelectorParsing.cpp b/Libraries/LibWeb/CSS/Parser/SelectorParsing.cpp index c9bfebbcac8..cc8e414da24 100644 --- a/Libraries/LibWeb/CSS/Parser/SelectorParsing.cpp +++ b/Libraries/LibWeb/CSS/Parser/SelectorParsing.cpp @@ -831,7 +831,7 @@ Parser::ParseErrorOr> Parser::parse_simple_se tokens.reconsume_current_input_token(); return Optional {}; default: - dbgln_if(CSS_PARSER_DEBUG, "!!! Invalid simple selector!"); + dbgln_if(CSS_PARSER_DEBUG, "Unrecognized delimiter in selector: '{}'", first_value.token().to_string()); return ParseError::SyntaxError; } } @@ -853,7 +853,7 @@ Parser::ParseErrorOr> Parser::parse_simple_se if (first_value.is(Token::Type::Colon)) return TRY(parse_pseudo_simple_selector(tokens)); - dbgln_if(CSS_PARSER_DEBUG, "!!! Invalid simple selector!"); + dbgln_if(CSS_PARSER_DEBUG, "Invalid simple selector: {}", first_value.to_debug_string()); return ParseError::SyntaxError; }