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

Unified Diff: tools/idl_parser/idl_parser.py

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
Index: tools/idl_parser/idl_parser.py
diff --git a/tools/idl_parser/idl_parser.py b/tools/idl_parser/idl_parser.py
index af0bd0555eeff9f9f11e15f785e32d547e6404bb..0fa9b616bae8672ba6a760a90f90e60a2c0dc430 100755
--- a/tools/idl_parser/idl_parser.py
+++ b/tools/idl_parser/idl_parser.py
@@ -324,8 +324,12 @@ class IDLParser(object):
# [17]
def p_DefaultValue(self, p):
"""DefaultValue : ConstValue
- | string"""
- if type(p[1]) == str:
+ | string
+ | '[' ']'"""
+ if len(p) == 3:
+ p[0] = ListFromConcat(self.BuildAttribute('TYPE', 'sequence'),
+ self.BuildAttribute('VALUE', '[]'))
+ elif type(p[1]) == str:
p[0] = ListFromConcat(self.BuildAttribute('TYPE', 'DOMString'),
self.BuildAttribute('NAME', p[1]))
else:

Powered by Google App Engine
This is Rietveld 408576698