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

Unified Diff: mojo/public/tools/bindings/pylib/mojom/parse/parser.py

Issue 611633002: mojom: Add associative arrays to the mojom language. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
Index: mojo/public/tools/bindings/pylib/mojom/parse/parser.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/parse/parser.py b/mojo/public/tools/bindings/pylib/mojom/parse/parser.py
index 35ac35901e7aa0dd07a0a578646f0f1c9673df52..9ed20eb028cbd21fc5e5d2338151e504d55779de 100644
--- a/mojo/public/tools/bindings/pylib/mojom/parse/parser.py
+++ b/mojo/public/tools/bindings/pylib/mojom/parse/parser.py
@@ -237,6 +237,7 @@ class Parser(object):
"""nonnullable_typename : basictypename
| array
| fixed_array
+ | associated_array
viettrungluu 2014/09/29 19:34:47 "associated" -> "associative"
| interfacerequest"""
p[0] = p[1]
@@ -275,6 +276,10 @@ class Parser(object):
snippet=self._GetSnippet(p.lineno(3)))
p[0] = p[1] + "[" + p[3] + "]"
+ def p_associated_array(self, p):
+ """associated_array : typename LBRACKET basictypename RBRACKET"""
viettrungluu 2014/09/29 19:34:47 a) It seems dubious/incorrect to allow "handletype
yzshen1 2014/09/29 19:53:24 About the "backward" issue, I am not sure whether
Elliot Glaysher 2014/10/02 19:54:03 Fixed by changing the grammar to look for "identif
+ p[0] = p[1] + "{" + p[3] + "}"
+
def p_interfacerequest(self, p):
"""interfacerequest : identifier AMP"""
p[0] = p[1] + "&"

Powered by Google App Engine
This is Rietveld 408576698