servo/components/script/dom/bindings/codegen/parser/abstract.patch
Anthony Ramine c25085f68a Introduce [Abstract] to mark non-leaf interfaces
Some interfaces like Node, CharacterData and HTMLTableCellElement are never
instantiated directly, only their descendant interfaces are. Those are marked
with [Abstract] to set their type_id to None instead of having dummy values
in the TypeId enums.
2015-09-13 19:46:28 +02:00

12 lines
616 B
Diff

--- WebIDL.py
+++ WebIDL.py
@@ -1357,7 +1357,8 @@ class IDLInterface(IDLObjectWithScope, IDLExposureMixins):
identifier == "ChromeOnly" or
identifier == "Unforgeable" or
identifier == "UnsafeInPrerendering" or
- identifier == "LegacyEventInit"):
+ identifier == "LegacyEventInit" or
+ identifier == "Abstract"):
# Known extended attributes that do not take values
if not attr.noArguments():
raise WebIDLError("[%s] must take no arguments" % identifier,