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

Side by Side Diff: Source/bindings/scripts/idl_compiler.py

Issue 19607011: Generate binding code for VoidCallback.idl with code generator in python (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: smaller Created 7 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
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (C) 2013 Google Inc. All rights reserved. 2 # Copyright (C) 2013 Google Inc. All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 reader = idl_reader.IdlReader(options.interface_dependencies_file, options.a dditional_idl_files, options.idl_attributes_file, output_directory, verbose) 105 reader = idl_reader.IdlReader(options.interface_dependencies_file, options.a dditional_idl_files, options.idl_attributes_file, output_directory, verbose)
106 definitions = reader.read_idl_definitions(idl_filename) 106 definitions = reader.read_idl_definitions(idl_filename)
107 if not definitions: 107 if not definitions:
108 # We generate dummy .h and .cpp files just to tell build scripts 108 # We generate dummy .h and .cpp files just to tell build scripts
109 # that outputs have been created. 109 # that outputs have been created.
110 code_generator_v8.generate_dummy_header_and_cpp(interface_name, output_d irectory) 110 code_generator_v8.generate_dummy_header_and_cpp(interface_name, output_d irectory)
111 return 111 return
112 if options.dump_json_and_pickle: 112 if options.dump_json_and_pickle:
113 write_json_and_pickle(definitions, interface_name, output_directory) 113 write_json_and_pickle(definitions, interface_name, output_directory)
114 return 114 return
115 # FIXME: turn on code generator 115 code_generator = code_generator_v8.CodeGeneratorV8(definitions, interface_na me, options.output_directory, options.idl_directories, verbose)
116 # Currently definitions must be None (so dummy .h and .cpp files are 116 code_generator.generate_header_and_cpp()
117 # generated), or --dump-json-and-pickle selected, as actual code generator
118 # not present yet.
119 # code_generator_v8.write_interface(definitions, interface_name, options.out put_directory)
120 raise RuntimeError('Stub: code generator not implemented yet')
121 117
122 118
123 if __name__ == '__main__': 119 if __name__ == '__main__':
124 sys.exit(main()) 120 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698