mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibIDL: Also parse extended attributes after 'optional'
From the WebIDL grammar: (https://webidl.spec.whatwg.org/#prod-Argument) Argument :: ExtendedAttributeList ArgumentRest ArgumentRest :: optional TypeWithExtendedAttributes ArgumentName Default TypeWithExtendedAttributes :: ExtendedAttributeList Type One IDL file has been updated to match the spec literally, as it can now be parsed properly.
This commit is contained in:
parent
cc1e8a4e9f
commit
725a758c66
Notes:
sideshowbarker
2024-07-17 01:04:03 +09:00
2 changed files with 7 additions and 1 deletions
|
@ -298,6 +298,12 @@ Vector<Parameter> Parser::parse_parameters()
|
|||
bool optional = lexer.consume_specific("optional");
|
||||
if (optional)
|
||||
consume_whitespace();
|
||||
if (lexer.consume_specific('[')) {
|
||||
// Not explicitly forbidden by the grammar but unlikely to happen in practice - if it does,
|
||||
// we'll have to teach the parser how to merge two sets of extended attributes.
|
||||
VERIFY(extended_attributes.is_empty());
|
||||
extended_attributes = parse_extended_attributes();
|
||||
}
|
||||
auto type = parse_type();
|
||||
bool variadic = lexer.consume_specific("..."sv);
|
||||
consume_whitespace();
|
||||
|
|
|
@ -10,7 +10,7 @@ interface CSSStyleDeclaration {
|
|||
CSSOMString getPropertyValue(CSSOMString property);
|
||||
CSSOMString getPropertyPriority(CSSOMString property);
|
||||
|
||||
[CEReactions] undefined setProperty(CSSOMString property, [LegacyNullToEmptyString] CSSOMString value, [LegacyNullToEmptyString] optional CSSOMString priority = "");
|
||||
[CEReactions] undefined setProperty(CSSOMString property, [LegacyNullToEmptyString] CSSOMString value, optional [LegacyNullToEmptyString] CSSOMString priority = "");
|
||||
[CEReactions] CSSOMString removeProperty(CSSOMString property);
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue