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

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

Issue 2659283002: Convert CSSPrimitiveValueUnits.in to json5 format (Closed)
Patch Set: add deprecation notice to in_generator.py Created 3 years, 10 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_css_primitive_value_unit_trie.py
diff --git a/third_party/WebKit/Source/build/scripts/make_css_primitive_value_unit_trie.py b/third_party/WebKit/Source/build/scripts/make_css_primitive_value_unit_trie.py
index bd07ff1958f4f97b6d39b8477270a1cb49c8045a..b59a8d2e0649c197d13c357adc4b6616fbc70e6f 100755
--- a/third_party/WebKit/Source/build/scripts/make_css_primitive_value_unit_trie.py
+++ b/third_party/WebKit/Source/build/scripts/make_css_primitive_value_unit_trie.py
@@ -5,20 +5,16 @@
import sys
-import in_generator
+import json5_generator
import trie_builder
import template_expander
-class UnitTrieWriter(in_generator.Writer):
- defaults = {
- 'unit_type': None
- }
+class UnitTrieWriter(json5_generator.Writer):
+ def __init__(self, json5_file_paths):
+ super(UnitTrieWriter, self).__init__(json5_file_paths)
- def __init__(self, in_file_paths):
- super(UnitTrieWriter, self).__init__(in_file_paths)
-
- self._units = {entry['name']: entry['unit_type'] for entry in self.in_file.name_dictionaries}
+ self._units = {entry['name']: entry['unit_type'] for entry in self.json5_file.name_dictionaries}
self._outputs = {
'CSSPrimitiveValueUnitTrie.cpp': self.generate_implementation
@@ -32,4 +28,4 @@ class UnitTrieWriter(in_generator.Writer):
if __name__ == '__main__':
- in_generator.Maker(UnitTrieWriter).main(sys.argv)
+ json5_generator.Maker(UnitTrieWriter).main()
« no previous file with comments | « third_party/WebKit/Source/build/scripts/in_generator.py ('k') | third_party/WebKit/Source/build/scripts/make_cssom_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698