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

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') | lib/html/scripts/idlnode.py » ('J')
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 8a3d81da48bc2d3cecd6f02c43be5c2683767a91..6705b718c06794eaa9c63c6f4b970f6cfbc31a72 100644
--- a/lib/html/scripts/generator.py
+++ b/lib/html/scripts/generator.py
@@ -91,17 +91,17 @@ 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>.
"""
+ def MaybeListElementTypeName(type_name):
podivilov 2012/09/13 13:01:57 If there is just one usage, why not inline?
Anton Muhin 2012/09/13 13:10:47 Done.
+ """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
+
for parent in interface.parents:
element_type = MaybeListElementTypeName(parent.type.id)
if element_type:
« no previous file with comments | « no previous file | lib/html/scripts/idlnode.py » ('j') | lib/html/scripts/idlnode.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698