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

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

Issue 10591002: Properly parse IDL arrays. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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/dom/scripts/idlparser.py » ('j') | lib/dom/scripts/idlparser.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/idlnode.py
diff --git a/lib/dom/scripts/idlnode.py b/lib/dom/scripts/idlnode.py
index 8a326e6a9f5f079c65ebddc48442dac8a52281d8..0d2e2df4ebc0b0d8ac99b93ec220b9a698fc2069 100755
--- a/lib/dom/scripts/idlnode.py
+++ b/lib/dom/scripts/idlnode.py
@@ -322,6 +322,9 @@ class IDLType(IDLNode):
if label.endswith('Type'):
self.id = self._label_to_type(label, ast)
break
+ array_modifiers = self._find_first(ast, 'ArrayModifiers')
+ if array_modifiers:
+ self.id += array_modifiers
elif isinstance(ast, tuple):
(label, value) = ast
if label == 'ScopedName':
@@ -334,10 +337,6 @@ class IDLType(IDLNode):
raise SyntaxError('Could not parse type %s' % (ast))
def _label_to_type(self, label, ast):
- if label == 'AnyArrayType':
- return 'any[]'
- if label == 'DOMStringArrayType':
- return 'DOMString[]'
if label == 'LongLongType':
label = 'long long'
elif label.endswith('Type'):
« no previous file with comments | « no previous file | lib/dom/scripts/idlparser.py » ('j') | lib/dom/scripts/idlparser.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698