From 6761791c9aeda15e6c971977d72dd9c5b328c5d9 Mon Sep 17 00:00:00 2001 From: Matthew Olsson Date: Fri, 10 Nov 2023 18:50:29 -0700 Subject: [PATCH] LibIDL: Require the 'attribute' keyword when parsing attributes --- Userland/Libraries/LibIDL/IDLParser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibIDL/IDLParser.cpp b/Userland/Libraries/LibIDL/IDLParser.cpp index 6e19273d08..1c01639193 100644 --- a/Userland/Libraries/LibIDL/IDLParser.cpp +++ b/Userland/Libraries/LibIDL/IDLParser.cpp @@ -272,6 +272,8 @@ void Parser::parse_attribute(HashMap& extend if (lexer.consume_specific("attribute")) consume_whitespace(); + else + report_parsing_error("expected 'attribute'"sv, filename, input, lexer.tell()); auto type = parse_type(); consume_whitespace();