| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 97     idl_filename = options.idl_filename | 97     idl_filename = options.idl_filename | 
| 98     basename = os.path.basename(idl_filename) | 98     basename = os.path.basename(idl_filename) | 
| 99     interface_name, _ = os.path.splitext(basename) | 99     interface_name, _ = os.path.splitext(basename) | 
| 100     output_directory = options.output_directory | 100     output_directory = options.output_directory | 
| 101     verbose = options.verbose | 101     verbose = options.verbose | 
| 102     if verbose: | 102     if verbose: | 
| 103         print idl_filename | 103         print idl_filename | 
| 104 | 104 | 
| 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     code_generator = code_generator_v8.CodeGeneratorV8(definitions, interface_na
     me, options.output_directory, options.idl_directories, verbose) | 
| 107     if not definitions: | 108     if not definitions: | 
| 108         # We generate dummy .h and .cpp files just to tell build scripts | 109         # We generate dummy .h and .cpp files just to tell build scripts | 
| 109         # that outputs have been created. | 110         # that outputs have been created. | 
| 110         code_generator_v8.generate_dummy_header_and_cpp(interface_name, output_d
     irectory) | 111         code_generator.write_dummy_header_and_cpp() | 
| 111         return | 112         return | 
| 112     if options.dump_json_and_pickle: | 113     if options.dump_json_and_pickle: | 
| 113         write_json_and_pickle(definitions, interface_name, output_directory) | 114         write_json_and_pickle(definitions, interface_name, output_directory) | 
| 114         return | 115         return | 
| 115     # FIXME: turn on code generator | 116     code_generator.write_header_and_cpp() | 
| 116     # Currently definitions must be None (so dummy .h and .cpp files are |  | 
| 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()) | 
| OLD | NEW | 
|---|