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

Unified Diff: lib/html/scripts/generator.py

Issue 10916286: Support proper parsing of sequence<T>. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | lib/html/scripts/idlnode.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/scripts/generator.py
diff --git a/lib/html/scripts/generator.py b/lib/html/scripts/generator.py
index 3399c0481532e0de95a2fc583fb80a21e6ae3234..3d45e49a145717039cd916ac981d4054a75548c1 100644
--- a/lib/html/scripts/generator.py
+++ b/lib/html/scripts/generator.py
@@ -91,21 +91,14 @@ def ListImplementationInfo(interface, database):
return (None, None)
-def MaybeListElementTypeName(type_name):
- """Returns the List element type T from string of form "List<T>", or None."""
- match = re.match(r'sequence<(\w*)>$', type_name)
- if match:
- return match.group(1)
- return None
-
def MaybeListElementType(interface):
"""Returns the List element type T, or None in interface does not implement
List<T>.
"""
for parent in interface.parents:
- element_type = MaybeListElementTypeName(parent.type.id)
- if element_type:
- return element_type
+ match = re.match(r'sequence<(\w*)>$', parent.type.id)
+ if match:
+ return match.group(1)
return None
def MaybeTypedArrayElementType(interface):
« no previous file with comments | « no previous file | lib/html/scripts/idlnode.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698