From 504d221e4a392f9902bc740e337df18b425ee38d Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Thu, 11 Aug 2022 15:48:40 +0100 Subject: [PATCH] LibWeb: Allow "unrestricted" floats and doubles in IDL For now, we don't treat them any differently from regular floats and doubles. --- .../CodeGenerators/LibWeb/WrapperGenerator/IDLParser.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLParser.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLParser.cpp index 4002337ab5..9e3427bfba 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLParser.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLParser.cpp @@ -180,6 +180,10 @@ NonnullRefPtr Parser::parse_type() if (unsigned_) consume_whitespace(); + // FIXME: Actually treat "unrestricted" and normal floats/doubles differently. + if (lexer.consume_specific("unrestricted")) + consume_whitespace(); + auto name = lexer.consume_until([](auto ch) { return !is_ascii_alphanumeric(ch) && ch != '_'; }); if (name.equals_ignoring_case("long"sv)) {