mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 804632. Allow certain reserved words as argument names in WebIDL. r=khuey
This commit is contained in:
parent
bb15ddc515
commit
f447d2024f
@ -2734,7 +2734,9 @@ class Tokenizer(object):
|
||||
"null": "NULL",
|
||||
"true": "TRUE",
|
||||
"false": "FALSE",
|
||||
"serializer": "SERIALIZER",
|
||||
"stringifier": "STRINGIFIER",
|
||||
"unrestricted": "UNRESTRICTED",
|
||||
"attribute": "ATTRIBUTE",
|
||||
"readonly": "READONLY",
|
||||
"inherit": "INHERIT",
|
||||
@ -3425,7 +3427,7 @@ class Parser(Tokenizer):
|
||||
|
||||
def p_Argument(self, p):
|
||||
"""
|
||||
Argument : ExtendedAttributeList Optional Type Ellipsis IDENTIFIER DefaultValue
|
||||
Argument : ExtendedAttributeList Optional Type Ellipsis ArgumentName DefaultValue
|
||||
"""
|
||||
t = p[3]
|
||||
assert isinstance(t, IDLType)
|
||||
@ -3448,6 +3450,32 @@ class Parser(Tokenizer):
|
||||
p[0] = IDLArgument(self.getLocation(p, 5), identifier, t, optional, defaultValue, variadic)
|
||||
p[0].addExtendedAttributes(p[1])
|
||||
|
||||
def p_ArgumentName(self, p):
|
||||
"""
|
||||
ArgumentName : IDENTIFIER
|
||||
| ATTRIBUTE
|
||||
| CALLBACK
|
||||
| CONST
|
||||
| CREATOR
|
||||
| DELETER
|
||||
| DICTIONARY
|
||||
| ENUM
|
||||
| EXCEPTION
|
||||
| GETTER
|
||||
| IMPLEMENTS
|
||||
| INHERIT
|
||||
| INTERFACE
|
||||
| LEGACYCALLER
|
||||
| PARTIAL
|
||||
| SERIALIZER
|
||||
| SETTER
|
||||
| STATIC
|
||||
| STRINGIFIER
|
||||
| TYPEDEF
|
||||
| UNRESTRICTED
|
||||
"""
|
||||
p[0] = p[1]
|
||||
|
||||
def p_Optional(self, p):
|
||||
"""
|
||||
Optional : OPTIONAL
|
||||
|
Loading…
Reference in New Issue
Block a user