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() |