diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2015-10-16 23:21:29 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2015-12-15 23:06:35 +0100 |
commit | 06947965b1635c4f5ff2aebcf5dfef35c6e95f23 (patch) | |
tree | 0872856caab3d7528875d7a61f87d5bf6277482a /components/script/dom/bindings/codegen/Configuration.py | |
parent | 432087c0ea6a5a419273b448eec62eb7549ba242 (diff) | |
download | servo-06947965b1635c4f5ff2aebcf5dfef35c6e95f23.tar.gz servo-06947965b1635c4f5ff2aebcf5dfef35c6e95f23.zip |
Remove all our local patches to the WebIDL parser
All the tweaks we need can just be made through Configuration.py, and
[Abstract] is being submitted upstream by Ms2ger.
Diffstat (limited to 'components/script/dom/bindings/codegen/Configuration.py')
-rw-r--r-- | components/script/dom/bindings/codegen/Configuration.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/components/script/dom/bindings/codegen/Configuration.py b/components/script/dom/bindings/codegen/Configuration.py index d0af7e37929..0fa06c83ea7 100644 --- a/components/script/dom/bindings/codegen/Configuration.py +++ b/components/script/dom/bindings/codegen/Configuration.py @@ -2,7 +2,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -from WebIDL import IDLInterface +from WebIDL import IDLExternalInterface, IDLInterface, WebIDLError class Configuration: @@ -23,6 +23,11 @@ class Configuration: self.interfaces = {} self.maxProtoChainLength = 0 for thing in parseData: + # Servo does not support external interfaces. + if isinstance(thing, IDLExternalInterface): + raise WebIDLError("Servo does not support external interfaces.", + [thing.location]) + # Some toplevel things are sadly types, and those have an # isInterface that doesn't mean the same thing as IDLObject's # isInterface()... @@ -345,6 +350,10 @@ class Descriptor(DescriptorProvider): # Some utility methods +def getModuleFromObject(object): + return object.location.filename().split('/')[-1].split('.webidl')[0] + 'Binding' + + def getTypesFromDescriptor(descriptor): """ Get all argument and return types for all members of the descriptor |