OLD | NEW |
---|---|
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 | 103 |
104 definitions = idl_reader.read_idl_definitions(idl_filename, options.interfac e_dependencies_file, options.additional_idl_files, options.idl_attributes_file, verbose=options.verbose, outputdir=options.output_directory) | 104 definitions = idl_reader.read_idl_definitions(idl_filename, options.interfac e_dependencies_file, options.additional_idl_files, options.idl_attributes_file, verbose=options.verbose, outputdir=options.output_directory) |
105 if not definitions: | 105 if not definitions: |
106 # We generate dummy .h and .cpp files just to tell build scripts | 106 # We generate dummy .h and .cpp files just to tell build scripts |
107 # that outputs have been created. | 107 # that outputs have been created. |
108 code_generator_v8.generate_dummy_header_and_cpp(interface_name, options. output_directory) | 108 code_generator_v8.generate_dummy_header_and_cpp(interface_name, options. output_directory) |
109 return | 109 return |
110 if options.dump_json_and_pickle: | 110 if options.dump_json_and_pickle: |
111 write_json_and_pickle(definitions, interface_name, options.output_direct ory) | 111 write_json_and_pickle(definitions, interface_name, options.output_direct ory) |
112 return | 112 return |
113 # FIXME: turn on code generator | 113 code_generator = code_generator_v8.code_generator_v8(definitions, interface_ name, options.output_directory, idl_directories=options.idl_directories, verbose =options.verbose) |
Nils Barth (inactive)
2013/07/24 11:41:20
This can be made shorter in a few ways:
* verbose
| |
114 # Currently definitions must be None (so dummy .h and .cpp files are | 114 code_generator.write_interface() |
115 # generated), or --dump-json-and-pickle selected, as actual code generator | |
116 # not present yet. | |
117 # code_generator_v8.write_interface(definitions, interface_name, options.out put_directory) | |
118 raise RuntimeError('Stub: code generator not implemented yet') | |
119 | 115 |
120 | 116 |
121 if __name__ == '__main__': | 117 if __name__ == '__main__': |
122 sys.exit(main()) | 118 sys.exit(main()) |
OLD | NEW |