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

Unified Diff: Source/bindings/scripts/unstable/v8_utilities.py

Issue 24867002: Add static attributes to IDL compiler (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revised Created 7 years, 3 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 | « Source/bindings/scripts/unstable/v8_interface.py ('k') | Source/bindings/templates/attributes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/unstable/v8_utilities.py
diff --git a/Source/bindings/scripts/unstable/v8_utilities.py b/Source/bindings/scripts/unstable/v8_utilities.py
index 28ecd6d398b94c6e4dd7b410b682eedaeece5e08..6a842a2ec5f1c8820a4a9eeda5d1c1ec266761ae 100644
--- a/Source/bindings/scripts/unstable/v8_utilities.py
+++ b/Source/bindings/scripts/unstable/v8_utilities.py
@@ -42,19 +42,14 @@ import v8_types
ACRONYMS = ['CSS', 'HTML', 'IME', 'JS', 'SVG', 'URL', 'WOFF', 'XML', 'XSLT']
-# FIXME: these could be merged as implemented_as_cpp_name
-def cpp_class_name(interface):
- return interface.extended_attributes.get('ImplementedAs', interface.name)
+def cpp_implemented_as_name(definition_or_member):
+ return definition_or_member.extended_attributes.get('ImplementedAs', definition_or_member.name)
-def cpp_method_name(attribute_or_operation):
- return attribute_or_operation.extended_attributes.get('ImplementedAs', attribute_or_operation.name)
-
-
-def generate_conditional_string(interface_or_attribute_or_operation):
- if 'Conditional' not in interface_or_attribute_or_operation.extended_attributes:
+def generate_conditional_string(definition_or_member):
+ if 'Conditional' not in definition_or_member.extended_attributes:
return ''
- conditional = interface_or_attribute_or_operation.extended_attributes['Conditional']
+ conditional = definition_or_member.extended_attributes['Conditional']
for operator in ['&', '|']:
if operator in conditional:
conditions = set(conditional.split(operator))
« no previous file with comments | « Source/bindings/scripts/unstable/v8_interface.py ('k') | Source/bindings/templates/attributes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698