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

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

Issue 386963003: [WIP][NotForLand] IDL dictionary support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: sequence and array support Created 6 years, 5 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 | « Source/bindings/scripts/idl_compiler.py ('k') | Source/bindings/scripts/idl_reader.py » ('j') | no next file with comments »
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 ab3b0c500df1f67c40d8160de7fa0c2a832dface..f71a35e56afb520a42a29727b68517128d9e67e8 100644
--- a/Source/bindings/scripts/idl_definitions.py
+++ b/Source/bindings/scripts/idl_definitions.py
@@ -206,15 +206,19 @@ class IdlCallbackFunction(TypedObject):
class IdlDictionary(object):
def __init__(self, node):
- self.parent = None
+ self.extended_attributes = {}
+ self.is_partial = node.GetProperty('Partial') or False
self.name = node.GetName()
self.members = []
+ self.parent = None
for child in node.GetChildren():
child_class = child.GetClass()
if child_class == 'Inherit':
self.parent = child.GetName()
elif child_class == 'Key':
self.members.append(IdlDictionaryMember(child))
+ elif child_class == 'ExtAttributes':
+ self.extended_attributes = ext_attributes_node_to_extended_attributes(child)
else:
raise ValueError('Unrecognized node class: %s' % child_class)
@@ -230,7 +234,7 @@ class IdlDictionaryMember(object):
if child_class == 'Type':
self.idl_type = type_node_to_type(child)
elif child_class == 'Default':
- self.default_value = child.GetProperty('VALUE')
+ self.default_value = default_node_to_idl_literal(child)
elif child_class == 'ExtAttributes':
self.extended_attributes = ext_attributes_node_to_extended_attributes(child)
else:
« no previous file with comments | « Source/bindings/scripts/idl_compiler.py ('k') | Source/bindings/scripts/idl_reader.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698