summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-12-19 03:26:59 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-12-19 03:26:59 +0100
commitc7ae364a887e9fb77196596d6e4345b455ab209f (patch)
tree741e4325721d1d8d9970e075320262097d3cbeb1
parentd461262405813f0721f9dbb2ff57b9f82e5f9b65 (diff)
downloaduxp-c7ae364a887e9fb77196596d6e4345b455ab209f.tar.gz
Issue #1322 - Part 4: Fix WebIDL.py parser for line endings and wrong
IDL name
-rw-r--r--dom/bindings/parser/WebIDL.py80
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