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

Unified Diff: mojo/public/bindings/parser/mojo_parser.py

Issue 63843003: Mojo: Add support for attributes [name=value] on interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/bindings/parser/mojo_parser.py
diff --git a/mojo/public/bindings/parser/mojo_parser.py b/mojo/public/bindings/parser/mojo_parser.py
index db13fd8d013ba37b12a262b619490ec28c60702e..9bc94896e0c873ca11848be2ff7b17001fcab283 100755
--- a/mojo/public/bindings/parser/mojo_parser.py
+++ b/mojo/public/bindings/parser/mojo_parser.py
@@ -150,7 +150,8 @@ class Parser(object):
p[0] = ListFromConcat(p[1], p[3])
def p_attribute(self, p):
- """attribute : NAME EQUALS NUMBER"""
+ """attribute : NAME EQUALS NUMBER
darin (slow to review) 2013/11/07 06:14:31 Previously, I had just supported [name=number] in
+ | NAME EQUALS NAME"""
p[0] = ('ATTRIBUTE', p[1], p[3])
def p_struct(self, p):
@@ -168,8 +169,8 @@ class Parser(object):
p[0] = ('FIELD', p[1], p[2], p[3])
def p_interface(self, p):
- """interface : INTERFACE NAME LCURLY methods RCURLY SEMICOLON"""
- p[0] = ('INTERFACE', p[2], p[4])
+ """interface : attribute_section INTERFACE NAME LCURLY methods RCURLY SEMICOLON"""
+ p[0] = ('INTERFACE', p[3], p[1], p[5])
def p_methods(self, p):
"""methods : method methods
« no previous file with comments | « no previous file | mojo/public/bindings/parser/mojo_translate.py » ('j') | mojo/public/bindings/parser/mojo_translate.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698