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:
Boris Zbarsky 2019-09-26 21:16:41 +00:00
Родитель 5925e241a9
Коммит 88ecc83259
2 изменённых файлов: 16 добавлений и 2 удалений

Просмотреть файл

@ -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")