Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Unified Diff: Source/bindings/scripts/idl_types.py

Issue 257783003: Basic support for unrestricted types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/bindings/scripts/idl_types.py
diff --git a/Source/bindings/scripts/idl_types.py b/Source/bindings/scripts/idl_types.py
index 5d54ebce0dabfc968881768f47941c8d6e6e9675..cc55877ac14a66ac1110e0700702df3169efc6a9 100644
--- a/Source/bindings/scripts/idl_types.py
+++ b/Source/bindings/scripts/idl_types.py
@@ -20,9 +20,9 @@ BASIC_TYPES = set([
# http://www.w3.org/TR/WebIDL/#dfn-primitive-type
'boolean',
'float',
- # unrestricted float is not supported
+ 'unrestricted float',
'double',
- # unrestricted double is not supported
+ 'unrestricted double',
# http://www.w3.org/TR/WebIDL/#idl-types
'DOMString',
'Date',
@@ -92,10 +92,13 @@ class IdlType(object):
callback_interfaces = set()
enums = {} # name -> values
- def __init__(self, base_type, is_array=False, is_sequence=False, is_nullable=False):
+ def __init__(self, base_type, is_array=False, is_sequence=False, is_nullable=False, is_unrestricted=False):
if is_array and is_sequence:
raise ValueError('Array of Sequences are not allowed.')
- self.base_type = base_type
+ if is_unrestricted:
+ self.base_type = 'unrestricted %s' % base_type
+ else:
+ self.base_type = base_type
self.is_array = is_array
self.is_sequence = is_sequence
self.is_nullable = is_nullable

Powered by Google App Engine
This is Rietveld 408576698