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

Unified Diff: third_party/WebKit/Source/build/scripts/make_element_lookup_trie.py

Issue 2645283006: Convert make_qualified_names and make_element_factory to use JSON5. (Closed)
Patch Set: Fix parameters skip Created 3 years, 11 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: third_party/WebKit/Source/build/scripts/make_element_lookup_trie.py
diff --git a/third_party/WebKit/Source/build/scripts/make_element_lookup_trie.py b/third_party/WebKit/Source/build/scripts/make_element_lookup_trie.py
index 5663f30087605200da7f8baa3b11d20f4d736ef5..89b0d36b65ea2270b86f8b56a979d0c65b744131 100755
--- a/third_party/WebKit/Source/build/scripts/make_element_lookup_trie.py
+++ b/third_party/WebKit/Source/build/scripts/make_element_lookup_trie.py
@@ -29,21 +29,21 @@
import sys
-import in_generator
+import json5_generator
import trie_builder
import template_expander
-class ElementLookupTrieWriter(in_generator.Writer):
+class ElementLookupTrieWriter(json5_generator.Writer):
# FIXME: Inherit all these from somewhere.
- defaults = {
- 'JSInterfaceName': None,
- 'constructorNeedsCreatedByParser': None,
- 'interfaceName': None,
- 'noConstructor': None,
- 'runtimeEnabled': None,
- }
default_parameters = {
+ 'JSInterfaceName': {},
+ 'constructorNeedsCreatedByParser': {},
+ 'interfaceName': {},
+ 'noConstructor': {},
+ 'runtimeEnabled': {},
+ }
+ default_metadata = {
'attrsNullNamespace': None,
'export': '',
'fallbackInterfaceName': '',
@@ -53,12 +53,12 @@ class ElementLookupTrieWriter(in_generator.Writer):
'namespaceURI': '',
}
- def __init__(self, in_file_paths):
- super(ElementLookupTrieWriter, self).__init__(in_file_paths)
+ def __init__(self, json5_file_paths):
+ super(ElementLookupTrieWriter, self).__init__(json5_file_paths)
self._tags = {}
- for entry in self.in_file.name_dictionaries:
+ for entry in self.json5_file.name_dictionaries:
self._tags[entry['name']] = entry['name']
- self._namespace = self.in_file.parameters['namespace'].strip('"')
+ self._namespace = self.json5_file.metadata['namespace'].strip('"')
self._outputs = {
(self._namespace + 'ElementLookupTrie.h'): self.generate_header,
(self._namespace + 'ElementLookupTrie.cpp'): self.generate_implementation,
@@ -79,4 +79,4 @@ class ElementLookupTrieWriter(in_generator.Writer):
if __name__ == '__main__':
- in_generator.Maker(ElementLookupTrieWriter).main(sys.argv)
+ json5_generator.Maker(ElementLookupTrieWriter).main()

Powered by Google App Engine
This is Rietveld 408576698