Chromium Code Reviews| 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: |