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

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: rebase 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
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..59218a8fd85bd332ae1a7da1814c4bda53a65280 100644
--- a/Source/bindings/scripts/blink_idl_parser.py
+++ b/Source/bindings/scripts/blink_idl_parser.py
@@ -333,23 +333,17 @@ 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)
+ # [b94] Add support for OR Extended Attribute values "A|B"
def p_ExtendedAttributeIdentList(self, p):
- """ExtendedAttributeIdentList : identifier '=' identifier '&' IdentAndList
+ """ExtendedAttributeIdentList : identifier '=' '(' IdentifierList ')'
| identifier '=' identifier '|' IdentOrList"""
- value = self.BuildAttribute('VALUE', p[3] + p[4] + p[5])
- p[0] = self.BuildNamed('ExtAttribute', p, 1, value)
-
- # [b76.2] A&B&C
- def p_IdentAndList(self, p):
- """IdentAndList : identifier '&' IdentAndList
- | identifier"""
- if len(p) > 3:
- p[0] = p[1] + p[2] + p[3]
+ if type(p[4]) is list:
+ value = self.BuildAttribute('VALUE', ','.join(p[4]))
else:
- p[0] = p[1]
+ value = self.BuildAttribute('VALUE', p[3] + p[4] + p[5])
+ p[0] = self.BuildNamed('ExtAttribute', p, 1, value)
- # [b76.3] A|B|C
+ # [b94.1] A|B|C
def p_IdentOrList(self, p):
"""IdentOrList : identifier '|' IdentOrList
| identifier"""
« no previous file with comments | « Source/bindings/scripts/aggregate_generated_bindings.py ('k') | Source/bindings/scripts/compute_global_objects.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698