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

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

Issue 7753042: Update generator for Chrome generation as the default case (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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/generators/idl_generator.py ('k') | no next file » | 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/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 """ Parser for PPAPI IDL """ 7 """ Parser for PPAPI IDL """
8 8
9 # 9 #
10 # IDL Parser 10 # IDL Parser
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 ast = ParseFiles(testnames) 961 ast = ParseFiles(testnames)
962 InfoOut.SetConsole(True) 962 InfoOut.SetConsole(True)
963 963
964 errs = ast.GetProperty('ERRORS') 964 errs = ast.GetProperty('ERRORS')
965 if errs: 965 if errs:
966 ErrOut.Log("Failed namespace test.") 966 ErrOut.Log("Failed namespace test.")
967 else: 967 else:
968 InfoOut.Log("Passed namespace test.") 968 InfoOut.Log("Passed namespace test.")
969 return errs 969 return errs
970 970
971 default_dirs = ['.', 'trusted'] 971 default_dirs = ['.', 'trusted', 'dev']
972 def ParseFiles(filenames): 972 def ParseFiles(filenames):
973 parser = IDLParser() 973 parser = IDLParser()
974 filenodes = [] 974 filenodes = []
975 errors = 0 975 errors = 0
976 976
977 if not filenames: 977 if not filenames:
978 filenames = [] 978 filenames = []
979 srcroot = GetOption('srcroot') 979 srcroot = GetOption('srcroot')
980 for dir in default_dirs: 980 for dir in default_dirs:
981 srcdir = os.path.join(srcroot, dir, '*.idl') 981 srcdir = os.path.join(srcroot, dir, '*.idl')
(...skipping 27 matching lines...) Expand all
1009 ast = ParseFiles(filenames) 1009 ast = ParseFiles(filenames)
1010 errs = ast.GetProperty('ERRORS') 1010 errs = ast.GetProperty('ERRORS')
1011 if errs: 1011 if errs:
1012 ErrOut.Log('Found %d error(s).' % errs); 1012 ErrOut.Log('Found %d error(s).' % errs);
1013 InfoOut.Log("%d files processed." % len(filenames)) 1013 InfoOut.Log("%d files processed." % len(filenames))
1014 return errs 1014 return errs
1015 1015
1016 if __name__ == '__main__': 1016 if __name__ == '__main__':
1017 sys.exit(Main(sys.argv[1:])) 1017 sys.exit(Main(sys.argv[1:]))
1018 1018
OLDNEW
« no previous file with comments | « ppapi/generators/idl_generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698