зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1535647. Disallow nullable types for WebIDL constants. r=qdot
These got removed from the spec. Differential Revision: https://phabricator.services.mozilla.com/D23681 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
cc63c03558
Коммит
6be51098cc
|
@ -5913,6 +5913,12 @@ class Parser(Tokenizer):
|
|||
assert len(p) == 3 # Must be []
|
||||
p[0] = IDLEmptySequenceValue(self.getLocation(p, 1))
|
||||
|
||||
def p_DefaultValueNull(self, p):
|
||||
"""
|
||||
DefaultValue : NULL
|
||||
"""
|
||||
p[0] = IDLNullValue(self.getLocation(p, 1))
|
||||
|
||||
def p_Exception(self, p):
|
||||
"""
|
||||
Exception : EXCEPTION IDENTIFIER Inheritance LBRACE ExceptionMembers RBRACE SEMICOLON
|
||||
|
@ -6042,12 +6048,6 @@ class Parser(Tokenizer):
|
|||
stringType = BuiltinTypes[IDLBuiltinType.Types.domstring]
|
||||
p[0] = IDLValue(location, stringType, p[1])
|
||||
|
||||
def p_ConstValueNull(self, p):
|
||||
"""
|
||||
ConstValue : NULL
|
||||
"""
|
||||
p[0] = IDLNullValue(self.getLocation(p, 1))
|
||||
|
||||
def p_BooleanLiteralTrue(self, p):
|
||||
"""
|
||||
BooleanLiteral : TRUE
|
||||
|
@ -6758,19 +6758,17 @@ class Parser(Tokenizer):
|
|||
|
||||
def p_ConstType(self, p):
|
||||
"""
|
||||
ConstType : PrimitiveType Null
|
||||
ConstType : PrimitiveType
|
||||
"""
|
||||
type = BuiltinTypes[p[1]]
|
||||
p[0] = self.handleNullable(type, p[2])
|
||||
p[0] = BuiltinTypes[p[1]]
|
||||
|
||||
def p_ConstTypeIdentifier(self, p):
|
||||
"""
|
||||
ConstType : IDENTIFIER Null
|
||||
ConstType : IDENTIFIER
|
||||
"""
|
||||
identifier = IDLUnresolvedIdentifier(self.getLocation(p, 1), p[1])
|
||||
|
||||
type = IDLUnresolvedType(self.getLocation(p, 1), identifier)
|
||||
p[0] = self.handleNullable(type, p[2])
|
||||
p[0] = IDLUnresolvedType(self.getLocation(p, 1), identifier)
|
||||
|
||||
def p_PrimitiveTypeUint(self, p):
|
||||
"""
|
||||
|
|
Загрузка…
Ссылка в новой задаче