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

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

Issue 8735013: Pepper IDL: also generate files from 'private' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | « no previous file | 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 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 ast = ParseFiles(testnames) 994 ast = ParseFiles(testnames)
995 InfoOut.SetConsole(True) 995 InfoOut.SetConsole(True)
996 996
997 errs = ast.GetProperty('ERRORS') 997 errs = ast.GetProperty('ERRORS')
998 if errs: 998 if errs:
999 ErrOut.Log("Failed namespace test.") 999 ErrOut.Log("Failed namespace test.")
1000 else: 1000 else:
1001 InfoOut.Log("Passed namespace test.") 1001 InfoOut.Log("Passed namespace test.")
1002 return errs 1002 return errs
1003 1003
1004 default_dirs = ['.', 'trusted', 'dev'] 1004 default_dirs = ['.', 'trusted', 'dev', 'private']
1005 def ParseFiles(filenames): 1005 def ParseFiles(filenames):
1006 parser = IDLParser() 1006 parser = IDLParser()
1007 filenodes = [] 1007 filenodes = []
1008 1008
1009 if not filenames: 1009 if not filenames:
1010 filenames = [] 1010 filenames = []
1011 srcroot = GetOption('srcroot') 1011 srcroot = GetOption('srcroot')
1012 for dirname in default_dirs: 1012 for dirname in default_dirs:
1013 srcdir = os.path.join(srcroot, dirname, '*.idl') 1013 srcdir = os.path.join(srcroot, dirname, '*.idl')
1014 srcdir = os.path.normpath(srcdir) 1014 srcdir = os.path.normpath(srcdir)
(...skipping 26 matching lines...) Expand all
1041 ast = ParseFiles(filenames) 1041 ast = ParseFiles(filenames)
1042 errs = ast.GetProperty('ERRORS') 1042 errs = ast.GetProperty('ERRORS')
1043 if errs: 1043 if errs:
1044 ErrOut.Log('Found %d error(s).' % errs); 1044 ErrOut.Log('Found %d error(s).' % errs);
1045 InfoOut.Log("%d files processed." % len(filenames)) 1045 InfoOut.Log("%d files processed." % len(filenames))
1046 return errs 1046 return errs
1047 1047
1048 if __name__ == '__main__': 1048 if __name__ == '__main__':
1049 sys.exit(Main(sys.argv[1:])) 1049 sys.exit(Main(sys.argv[1:]))
1050 1050
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698