Issue #1322 - Part 4: Fix WebIDL.py parser for line endings and wrong

IDL name
This commit is contained in:
wolfbeast 2019-12-19 03:26:59 +01:00 • committed by Roy Tam
commit d3e44892bf

View file

@ -2851,9 +2851,9 @@ class IDLWrapperType(IDLType):
return set() return set()
class IDLPromiseType(IDLParametrizedType): class IDLPromiseType(IDLParameterizedType):
def __init__(self, location, innerType): def __init__(self, location, innerType):
IDLParametrizedType.__init__(self, location, "Promise", innerType) IDLParameterizedType.__init__(self, location, "Promise", innerType)
def __eq__(self, other): def __eq__(self, other):
return (isinstance(other, IDLPromiseType) and return (isinstance(other, IDLPromiseType) and
@ -6439,7 +6439,7 @@ class Parser(Tokenizer):
if p[1].name == "Promise": if p[1].name == "Promise":
raise WebIDLError("Promise used without saying what it's " raise WebIDLError("Promise used without saying what it's "
"parametrized over", "parameterized over",
[self.getLocation(p, 1)]) [self.getLocation(p, 1)])
type = None type = None