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

Unified Diff: Source/bindings/scripts/blink_idl_parser.py

Issue 434133002: Support WebIDL's ExtendedAttributeIdentList in the Blink parser (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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: Source/bindings/scripts/blink_idl_parser.py
diff --git a/Source/bindings/scripts/blink_idl_parser.py b/Source/bindings/scripts/blink_idl_parser.py
index a8defe23fe770ec5dda18ec1931f7b5664e40ce8..feed0e55d9449cbb2fd47bad4ba9b3eec350d691 100644
--- a/Source/bindings/scripts/blink_idl_parser.py
+++ b/Source/bindings/scripts/blink_idl_parser.py
@@ -333,17 +333,23 @@ class BlinkIDLParser(IDLParser):
elif len(p) == 3:
p[0] = ListFromConcat(self.BuildTrue('NULLABLE'), p[2])
- # [b76.1] Add support for compound Extended Attribute values (A&B and A|B)
+ # [94] A=(B,C)
+ # Blink extension: OR attribute lists, A=B|C
def p_ExtendedAttributeIdentList(self, p):
- """ExtendedAttributeIdentList : identifier '=' identifier '&' IdentAndList
+ """ExtendedAttributeIdentList : identifier '=' '(' identifier ',' IdentifierList ')'
| identifier '=' identifier '|' IdentOrList"""
- value = self.BuildAttribute('VALUE', p[3] + p[4] + p[5])
- p[0] = self.BuildNamed('ExtAttribute', p, 1, value)
+ if len(p) == 6:
+ value = p[3] + p[4] + p[5]
+ else:
+ value = p[4] + p[5] + p[6]
+
+ attribute = self.BuildAttribute('VALUE', value)
+ p[0] = self.BuildNamed('ExtAttribute', p, 1, attribute)
- # [b76.2] A&B&C
- def p_IdentAndList(self, p):
- """IdentAndList : identifier '&' IdentAndList
- | identifier"""
+ # [89] A,B,C
+ def p_IdentifierList(self, p):
+ """IdentifierList : identifier ',' IdentifierList
+ | identifier"""
if len(p) > 3:
p[0] = p[1] + p[2] + p[3]
else:

Powered by Google App Engine
This is Rietveld 408576698