diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-12-19 03:26:59 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-12-19 03:26:59 +0100 |
commit | f829572790ff37ec1d3cbb45cfb9978378894c6d (patch) | |
tree | 741e4325721d1d8d9970e075320262097d3cbeb1 /dom/bindings | |
parent | 33cef3b9ce1c443ceaf326abac34feb828203502 (diff) | |
download | uxp-f829572790ff37ec1d3cbb45cfb9978378894c6d.tar.gz |
Issue mcp-graveyard/UXP#1322 - Part 4: Fix WebIDL.py parser for line endings and wrong
IDL name
Diffstat (limited to 'dom/bindings')
-rw-r--r-- | dom/bindings/parser/WebIDL.py | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/dom/bindings/parser/WebIDL.py b/dom/bindings/parser/WebIDL.py index fafb3c9b6f..4f602365b1 100644 --- a/dom/bindings/parser/WebIDL.py +++ b/dom/bindings/parser/WebIDL.py @@ -2850,45 +2850,45 @@ class IDLWrapperType(IDLType): return set([self.inner]) return set() -
-class IDLPromiseType(IDLParametrizedType):
- def __init__(self, location, innerType):
- IDLParametrizedType.__init__(self, location, "Promise", innerType)
-
- def __eq__(self, other):
- return (isinstance(other, IDLPromiseType) and
- self.promiseInnerType() == other.promiseInnerType())
-
- def __str__(self):
- return self.inner.__str__() + "Promise"
-
- def isPromise(self):
- return True
-
- def promiseInnerType(self):
- return self.inner
-
- def tag(self):
- return IDLType.Tags.promise
-
- def complete(self, scope):
- self.inner = self.promiseInnerType().complete(scope)
- return self
-
- def unroll(self):
- # We do not unroll our inner. Just stop at ourselves. That
- # lets us add headers for both ourselves and our inner as
- # needed.
- return self
-
- def isDistinguishableFrom(self, other):
- # Promises are not distinguishable from anything.
- return False
-
- def isExposedInAllOf(self, exposureSet):
- # Check the internal type
- return self.promiseInnerType().unroll().isExposedInAllOf(exposureSet)
-
+ +class IDLPromiseType(IDLParameterizedType): + def __init__(self, location, innerType): + IDLParameterizedType.__init__(self, location, "Promise", innerType) + + def __eq__(self, other): + return (isinstance(other, IDLPromiseType) and + self.promiseInnerType() == other.promiseInnerType()) + + def __str__(self): + return self.inner.__str__() + "Promise" + + def isPromise(self): + return True + + def promiseInnerType(self): + return self.inner + + def tag(self): + return IDLType.Tags.promise + + def complete(self, scope): + self.inner = self.promiseInnerType().complete(scope) + return self + + def unroll(self): + # We do not unroll our inner. Just stop at ourselves. That + # lets us add headers for both ourselves and our inner as + # needed. + return self + + def isDistinguishableFrom(self, other): + # Promises are not distinguishable from anything. + return False + + def isExposedInAllOf(self, exposureSet): + # Check the internal type + return self.promiseInnerType().unroll().isExposedInAllOf(exposureSet) + class IDLBuiltinType(IDLType): @@ -6439,7 +6439,7 @@ class Parser(Tokenizer): if p[1].name == "Promise": raise WebIDLError("Promise used without saying what it's " - "parametrized over", + "parameterized over", [self.getLocation(p, 1)]) type = None |