Index: client/dom/scripts/generator.py |
diff --git a/client/dom/scripts/generator.py b/client/dom/scripts/generator.py |
index b235c0e370d3adb66767b95efea4d67e30e0a024..fb43f50596567aad73c2f154250cc0f536cc7423 100644 |
--- a/client/dom/scripts/generator.py |
+++ b/client/dom/scripts/generator.py |
@@ -234,9 +234,6 @@ def MatchSourceFilter(filter, thing): |
return any(token in thing.annotations for token in filter) |
def DartType(idl_type_name): |
- match = re.match(r'sequence<(\w*)>$', idl_type_name) |
- if match: |
- return 'List<%s>' % GetIDLTypeInfo(match.group(1)).dart_type() |
return GetIDLTypeInfo(idl_type_name).dart_type() |
# Given a list of overloaded arguments, render a dart argument. |
@@ -487,6 +484,11 @@ class IDLTypeInfo(object): |
def dart_type(self): |
if self._dart_type: |
return self._dart_type |
+ |
+ match = re.match(r'sequence<(\w*)>$', self._idl_type) |
+ if match: |
+ return 'List<%s>' % DartType(match.group(1)) |
podivilov
2012/03/23 15:12:07
nit: should be GetIDLTypeInfo(match.group(1)).dart
Anton Muhin
2012/03/23 17:27:31
DartType is exactly this now, no?
|
+ |
return self._idl_type |
def native_type(self): |
@@ -540,7 +542,13 @@ class IDLTypeInfo(object): |
return 'receiver->' |
def conversion_includes(self): |
- return ['"Dart%s.h"' % include for include in [self.dart_type()] + self._conversion_includes] |
+ def NeededDartType(type_name): |
+ match = re.match(r'List<(\w*)>$', type_name) |
+ if match: |
+ return NeededDartType(match.group(1)) |
+ return type_name |
+ |
+ return ['"Dart%s.h"' % include for include in [NeededDartType(self.dart_type())] + self._conversion_includes] |
podivilov
2012/03/23 15:12:07
Please parse the type in constructor, so you don't
Anton Muhin
2012/03/23 17:27:31
Should I do it right now? If we're looking for op
|
def conversion_cast(self, expression): |
if self._conversion_template: |