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

Unified Diff: Source/bindings/scripts/idl_definitions.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
« no previous file with comments | « no previous file | Source/bindings/scripts/idl_types.py » ('j') | Source/bindings/scripts/v8_types.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/idl_definitions.py
diff --git a/Source/bindings/scripts/idl_definitions.py b/Source/bindings/scripts/idl_definitions.py
index e6b2a9a1cf2fdfd72e3b8b81d4ccb1a2b4aab202..2230c8f6e207153d8145a7d7dca1560077f1bf7b 100644
--- a/Source/bindings/scripts/idl_definitions.py
+++ b/Source/bindings/scripts/idl_definitions.py
@@ -653,7 +653,9 @@ def type_node_inner_to_type(node, is_array=False, is_nullable=False):
# either a typedef shorthand (but not a Typedef declaration itself) or an
# interface type. We do not distinguish these, and just use the type name.
if node_class in ['PrimitiveType', 'Typeref']:
- return IdlType(node.GetName(), is_array=is_array, is_nullable=is_nullable)
+ # unrestricted syntax: unrestricted double | unrestricted float
+ is_unrestricted = node.GetProperty('UNRESTRICTED') or False
+ return IdlType(node.GetName(), is_array=is_array, is_nullable=is_nullable, is_unrestricted=is_unrestricted)
elif node_class == 'Any':
return IdlType('any', is_array=is_array, is_nullable=is_nullable)
elif node_class == 'Sequence':
« no previous file with comments | « no previous file | Source/bindings/scripts/idl_types.py » ('j') | Source/bindings/scripts/v8_types.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698