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",
|
"null": "NULL",
|
||||||
"true": "TRUE",
|
"true": "TRUE",
|
||||||
"false": "FALSE",
|
"false": "FALSE",
|
||||||
|
"serializer": "SERIALIZER",
|
||||||
"stringifier": "STRINGIFIER",
|
"stringifier": "STRINGIFIER",
|
||||||
|
"unrestricted": "UNRESTRICTED",
|
||||||
"attribute": "ATTRIBUTE",
|
"attribute": "ATTRIBUTE",
|
||||||
"readonly": "READONLY",
|
"readonly": "READONLY",
|
||||||
"inherit": "INHERIT",
|
"inherit": "INHERIT",
|
||||||
@ -3425,7 +3427,7 @@ class Parser(Tokenizer):
|
|||||||
|
|
||||||
def p_Argument(self, p):
|
def p_Argument(self, p):
|
||||||
"""
|
"""
|
||||||
Argument : ExtendedAttributeList Optional Type Ellipsis IDENTIFIER DefaultValue
|
Argument : ExtendedAttributeList Optional Type Ellipsis ArgumentName DefaultValue
|
||||||
"""
|
"""
|
||||||
t = p[3]
|
t = p[3]
|
||||||
assert isinstance(t, IDLType)
|
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] = IDLArgument(self.getLocation(p, 5), identifier, t, optional, defaultValue, variadic)
|
||||||
p[0].addExtendedAttributes(p[1])
|
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):
|
def p_Optional(self, p):
|
||||||
"""
|
"""
|
||||||
Optional : OPTIONAL
|
Optional : OPTIONAL
|
||||||
|
Loading…
Reference in New Issue
Block a user