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

Side by Side Diff: ppapi/generators/generator.py

Issue 8653004: Fix python scripts in src/ppapi/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase error Created 8 years, 11 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
« no previous file with comments | « ppapi/generate_ppapi_size_checks.py ('k') | ppapi/generators/idl_ast.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/env python
2 #
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # 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 3 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 4 # found in the LICENSE file.
6 5
7 import sys 6 import sys
8 7
9 # Note: some of these files are imported to register cmdline options. 8 # Note: some of these files are imported to register cmdline options.
10 from idl_generator import Generator 9 from idl_generator import Generator
11 from idl_option import ParseOptions 10 from idl_option import ParseOptions
12 from idl_outfile import IDLOutFile 11 from idl_outfile import IDLOutFile
13 from idl_parser import ParseFiles 12 from idl_parser import ParseFiles
14 from idl_c_header import HGen 13 from idl_c_header import HGen
15 from idl_gen_pnacl import PnaclGen 14 from idl_gen_pnacl import PnaclGen
16 15
17 16
18 def Main(args): 17 def Main():
18 args = sys.argv[1:]
19 # If no arguments are provided, assume we are tring to rebuild the
20 # C headers with warnings off.
21 if not args:
22 args = ['--wnone', '--cgen', '--range=start,end']
23
19 filenames = ParseOptions(args) 24 filenames = ParseOptions(args)
20 ast = ParseFiles(filenames) 25 ast = ParseFiles(filenames)
21 return Generator.Run(ast) 26 return Generator.Run(ast)
22 27
28
23 if __name__ == '__main__': 29 if __name__ == '__main__':
24 args = sys.argv[1:] 30 sys.exit(Main())
25
26 # If no arguments are provided, assume we are tring to rebuild the
27 # C headers with warnings off.
28 if not args: args = ['--wnone', '--cgen', '--range=start,end']
29
30 sys.exit(Main(args))
OLDNEW
« no previous file with comments | « ppapi/generate_ppapi_size_checks.py ('k') | ppapi/generators/idl_ast.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698