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

Unified Diff: lib/dom/scripts/dartgenerator.py

Issue 10704219: Handle all registered types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
Index: lib/dom/scripts/dartgenerator.py
diff --git a/lib/dom/scripts/dartgenerator.py b/lib/dom/scripts/dartgenerator.py
index c5c4be55c09e730ddbdb066b82fea7b257559e7f..0c8f454c3f7d1b2c0af845d66130f66b2e962c10 100755
--- a/lib/dom/scripts/dartgenerator.py
+++ b/lib/dom/scripts/dartgenerator.py
@@ -38,6 +38,9 @@ class DartGenerator(object):
if IsPrimitiveType(type_name):
return True
+ if type_name.endswith('?'):
+ return self._IsCompoundType(database, type_name[:-len('?')])
+
if type_name.endswith('[]'):
return self._IsCompoundType(database, type_name[:-len('[]')])
@@ -45,6 +48,11 @@ class DartGenerator(object):
if database.HasInterface(striped_type_name):
return True
+ # Didn't recognize the name - perhaps it is one of the WebKit Array
+ # typedefs like MutationRecordArray.
+ if type_name.endswith('Array'):
+ return self._IsCompoundType(database, type_name[:-len('Array')])
podivilov 2012/07/16 10:25:12 This is fragile, could you please rename IsPrimiti
+
dart_template_match = self._dart_templates_re.match(type_name)
if dart_template_match:
# Dart templates

Powered by Google App Engine
This is Rietveld 408576698