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

Unified Diff: tools/idl_parser/idl_parser.py

Issue 447543002: Introduce support for ExtendedAttributeIdentList in the IDL parser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | tools/idl_parser/idl_ppapi_parser.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/idl_parser/idl_parser.py
diff --git a/tools/idl_parser/idl_parser.py b/tools/idl_parser/idl_parser.py
index a8cd82f8cf9a66fbab96071e8a1f36151f292644..a19785bfb1b54792ab99cd2fdfad7d25aaabb726 100755
--- a/tools/idl_parser/idl_parser.py
+++ b/tools/idl_parser/idl_parser.py
@@ -654,15 +654,17 @@ class IDLParser(object):
# We only support:
# [ identifier ]
+ # [ identifier ( ArgumentList ) ]
# [ identifier = identifier ]
- # [ identifier ( ArgumentList )]
- # [ identifier = identifier ( ArgumentList )]
+ # [ identifier = ( IdentifierList ) ]
+ # [ identifier = identifier ( ArgumentList ) ]
# [66] map directly to [91-93, 95]
# [67-69, 71] are unsupported
def p_ExtendedAttribute(self, p):
"""ExtendedAttribute : ExtendedAttributeNoArgs
| ExtendedAttributeArgList
| ExtendedAttributeIdent
+ | ExtendedAttributeIdentList
| ExtendedAttributeNamedArgList"""
p[0] = p[1]
@@ -855,7 +857,17 @@ class IDLParser(object):
else:
p[0] = p[1]
- # [89-90] NOT IMPLEMENTED (IdentifierList)
+ # [89]
+ def p_IdentifierList(self, p):
+ """IdentifierList : identifier Identifiers"""
+ p[0] = ListFromConcat(p[1], p[2])
+
+ # [90]
+ def p_Identifiers(self, p):
+ """Identifiers : ',' identifier Identifiers
+ |"""
+ if len(p) > 1:
+ p[0] = ListFromConcat(p[2], p[3])
# [91]
def p_ExtendedAttributeNoArgs(self, p):
@@ -874,7 +886,11 @@ class IDLParser(object):
value = self.BuildAttribute('VALUE', p[3])
p[0] = self.BuildNamed('ExtAttribute', p, 1, value)
- # [94] NOT IMPLEMENTED (ExtendedAttributeIdentList)
+ # [94]
+ def p_ExtendedAttributeIdentList(self, p):
+ """ExtendedAttributeIdentList : identifier '=' '(' IdentifierList ')'"""
+ value = self.BuildAttribute('VALUE', p[4])
+ p[0] = self.BuildNamed('ExtAttribute', p, 1, value)
# [95]
def p_ExtendedAttributeNamedArgList(self, p):
« no previous file with comments | « no previous file | tools/idl_parser/idl_ppapi_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698