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

Side by Side Diff: lib/dom/scripts/dartdomgenerator.py

Issue 10821012: Autogenerate additional arguments for fanky methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This is the entry point to create Dart APIs from the IDL database.""" 6 """This is the entry point to create Dart APIs from the IDL database."""
7 7
8 import dartgenerator 8 import dartgenerator
9 import database 9 import database
10 import logging.config 10 import logging.config
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 generator.FilterMembersWithUnidentifiedTypes(common_database) 55 generator.FilterMembersWithUnidentifiedTypes(common_database)
56 webkit_database = common_database.Clone() 56 webkit_database = common_database.Clone()
57 57
58 # Generate Dart interfaces for the WebKit DOM. 58 # Generate Dart interfaces for the WebKit DOM.
59 generator.FilterInterfaces(database = webkit_database, 59 generator.FilterInterfaces(database = webkit_database,
60 or_annotations = ['WebKit', 'Dart'], 60 or_annotations = ['WebKit', 'Dart'],
61 exclude_displaced = ['WebKit'], 61 exclude_displaced = ['WebKit'],
62 exclude_suppressed = ['WebKit', 'Dart']) 62 exclude_suppressed = ['WebKit', 'Dart'])
63 generator.RenameTypes(webkit_database, _webkit_renames, True) 63 generator.RenameTypes(webkit_database, _webkit_renames, True)
64 generator.FixEventTargets(webkit_database) 64 generator.FixEventTargets(webkit_database)
65 generator.AddMissingArguments(webkit_database)
65 66
66 def CreateGeneratorOptions(template_paths, conditions, type_registry, output_d ir, 67 def CreateGeneratorOptions(template_paths, conditions, type_registry, output_d ir,
67 renamer=None): 68 renamer=None):
68 template_loader = TemplateLoader(template_dir, template_paths, conditions) 69 template_loader = TemplateLoader(template_dir, template_paths, conditions)
69 return GeneratorOptions( 70 return GeneratorOptions(
70 template_loader, webkit_database, emitters, type_registry, renamer, 71 template_loader, webkit_database, emitters, type_registry, renamer,
71 output_dir) 72 output_dir)
72 73
73 def Generate(system): 74 def Generate(system):
74 generator.Generate(webkit_database, system, 75 generator.Generate(webkit_database, system,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 dom_output_dir = options.output_dir or os.path.join(current_dir, 178 dom_output_dir = options.output_dir or os.path.join(current_dir,
178 '../generated') 179 '../generated')
179 html_output_dir = options.output_dir or os.path.join(current_dir, 180 html_output_dir = options.output_dir or os.path.join(current_dir,
180 '../../html/generated') 181 '../../html/generated')
181 Generate(systems, database_dir, options.use_database_cache, 182 Generate(systems, database_dir, options.use_database_cache,
182 dom_output_dir, html_output_dir) 183 dom_output_dir, html_output_dir)
183 GenerateSingleFile(systems) 184 GenerateSingleFile(systems)
184 185
185 if __name__ == '__main__': 186 if __name__ == '__main__':
186 sys.exit(main()) 187 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698