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

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

Issue 386963003: [WIP][NotForLand] IDL dictionary support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: sequence and array support 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
« no previous file with comments | « Source/bindings/scripts/scripts.gypi ('k') | Source/bindings/scripts/v8_dictionary.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/utilities.py
diff --git a/Source/bindings/scripts/utilities.py b/Source/bindings/scripts/utilities.py
index 0aeabc20b3610e6fbef41af25430e1b57cd958e5..74c318a9fbb28332bc572df7657e4debb2830901 100644
--- a/Source/bindings/scripts/utilities.py
+++ b/Source/bindings/scripts/utilities.py
@@ -49,6 +49,9 @@ def write_file(new_text, destination_filename, only_if_changed):
with open(destination_filename) as destination_file:
if destination_file.read() == new_text:
return
+ destination_dirname = os.path.dirname(destination_filename)
+ if not os.path.exists(destination_dirname):
+ os.makedirs(destination_dirname)
with open(destination_filename, 'w') as destination_file:
destination_file.write(new_text)
@@ -119,6 +122,11 @@ def is_callback_interface_from_idl(file_contents):
return bool(match)
+def is_dictionary_from_idl(file_contents):
+ match = re.search(r'dictionary\s+\w+\s*{', file_contents)
+ return bool(match)
+
+
def get_parent_interface(file_contents):
match = re.search(r'interface\s+'
r'\w+\s*'
« no previous file with comments | « Source/bindings/scripts/scripts.gypi ('k') | Source/bindings/scripts/v8_dictionary.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698