зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1584052. Remove "module" as a reserved word in our Web IDL parser. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D47299 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
5925e241a9
Коммит
88ecc83259
|
@ -5598,7 +5598,6 @@ class Tokenizer(object):
|
|||
return t
|
||||
|
||||
keywords = {
|
||||
"module": "MODULE",
|
||||
"interface": "INTERFACE",
|
||||
"partial": "PARTIAL",
|
||||
"mixin": "MIXIN",
|
||||
|
@ -6892,7 +6891,6 @@ class Parser(Tokenizer):
|
|||
| INHERIT
|
||||
| INTERFACE
|
||||
| LONG
|
||||
| MODULE
|
||||
| NULL
|
||||
| OBJECT
|
||||
| OCTET
|
||||
|
|
|
@ -736,3 +736,19 @@ def WebIDLTest(parser, harness):
|
|||
threw = True
|
||||
|
||||
harness.ok(threw, "Only unrestricted values can be initialized to NaN")
|
||||
|
||||
parser = parser.reset();
|
||||
threw = False
|
||||
try:
|
||||
parser.parse("""
|
||||
dictionary Foo {
|
||||
long module;
|
||||
};
|
||||
""")
|
||||
results = parser.finish()
|
||||
except:
|
||||
threw = True
|
||||
|
||||
harness.ok(not threw, "Should be able to use 'module' as a dictionary member name")
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче