Index: Source/bindings/scripts/v8_utilities.py |
diff --git a/Source/bindings/scripts/v8_utilities.py b/Source/bindings/scripts/v8_utilities.py |
index 674a1b8d9969b08a53404147c1c7e289db1f73f4..6da981a96c4ce1ce3546ecedf233cc189495f085 100644 |
--- a/Source/bindings/scripts/v8_utilities.py |
+++ b/Source/bindings/scripts/v8_utilities.py |
@@ -60,7 +60,7 @@ ACRONYMS = [ |
def extended_attribute_value_contains(extended_attribute_value, value): |
return (extended_attribute_value and |
- value in re.split('[|&]', extended_attribute_value)) |
+ value in re.split('[|,]', extended_attribute_value)) |
def has_extended_attribute(definition_or_member, extended_attribute_list): |
@@ -203,15 +203,21 @@ def call_with_arguments(call_with_values): |
# [Conditional] |
+DELIMITER_TO_OPERATOR = { |
+ '|': '||', |
+ ',': '&&', |
+} |
+ |
+ |
def conditional_string(definition_or_member): |
extended_attributes = definition_or_member.extended_attributes |
if 'Conditional' not in extended_attributes: |
return None |
conditional = extended_attributes['Conditional'] |
- for operator in '&|': |
- if operator in conditional: |
- conditions = conditional.split(operator) |
- operator_separator = ' %s%s ' % (operator, operator) |
+ for delimiter in ',|': |
+ if delimiter in conditional: |
+ conditions = conditional.split(delimiter) |
+ operator_separator = ' %s ' % DELIMITER_TO_OPERATOR[delimiter] |
return operator_separator.join('ENABLE(%s)' % expression for expression in sorted(conditions)) |
return 'ENABLE(%s)' % conditional |