| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # | 2 # |
| 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 import sys | 7 import sys |
| 8 | 8 |
| 9 from idl_ast import IDLAst | 9 from idl_ast import IDLAst |
| 10 from idl_generator import Generator | 10 from idl_generator import Generator |
| 11 from idl_log import ErrOut, InfoOut, WarnOut | 11 from idl_log import ErrOut, InfoOut, WarnOut |
| 12 from idl_node import IDLAttribute, IDLNode | 12 from idl_node import IDLAttribute, IDLNode |
| 13 from idl_option import GetOption, Option, ParseOptions | 13 from idl_option import GetOption, Option, ParseOptions |
| 14 from idl_outfile import IDLOutFile | 14 from idl_outfile import IDLOutFile |
| 15 from idl_parser import ParseFiles | 15 from idl_parser import ParseFiles |
| 16 from idl_c_header import HGen | 16 from idl_c_header import HGen |
| 17 | 17 |
| 18 | 18 |
| 19 def Main(args): | 19 def Main(args): |
| 20 filenames = ParseOptions(args) | 20 filenames = ParseOptions(args) |
| 21 ast = ParseFiles(filenames) | 21 ast = ParseFiles(filenames) |
| 22 return Generator.Run(ast) | 22 return Generator.Run(ast) |
| 23 | 23 |
| 24 if __name__ == '__main__': | 24 if __name__ == '__main__': |
| 25 args = sys.argv[1:] | 25 args = sys.argv[1:] |
| 26 | 26 |
| 27 # If no arguments are provided, assume we are tring to rebuild the | 27 # If no arguments are provided, assume we are tring to rebuild the |
| 28 # C headers with warnings off. | 28 # C headers with warnings off. |
| 29 if not args: args = ['--wnone', '--cgen', '--range=M13,M16'] | 29 if not args: args = ['--wnone', '--cgen', '--range=M13,M17'] |
| 30 | 30 |
| 31 sys.exit(Main(args)) | 31 sys.exit(Main(args)) |
| 32 | |
| OLD | NEW |