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

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

Issue 7477056: Add base class for generators (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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') | ppapi/generators/test_cgen/enum_typedef.h » ('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/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 """ 7 """
8 IDLNamespace for PPAPI 8 IDLNamespace for PPAPI
9 9
10 This file defines the behavior of the AST namespace which allows for resolving 10 This file defines the behavior of the AST namespace which allows for resolving
11 a symbol as one or more AST nodes given a version or range of versions. 11 a symbol as one or more AST nodes given a version or range of versions.
12 """ 12 """
13 13
14 import sys 14 import sys
15 15
16 from idl_option import GetOption, Option, ParseOptions 16 from idl_option import GetOption, Option, ParseOptions
17 from idl_log import ErrOut, InfoOut, WarnOut 17 from idl_log import ErrOut, InfoOut, WarnOut
18 from idl_version import IDLVersion 18 from idl_version import IDLVersion
19 19
20 Option('label', 'Use the specifed label blocks.', default='Chrome') 20 Option('label', 'Use the specifed label blocks.', default='Chrome')
21 Option('version', 'Use the specified version', default='M14')
22 Option('namespace_debug', 'Use the specified version') 21 Option('namespace_debug', 'Use the specified version')
23 22
24 23
25 # 24 #
26 # IDLVersionList 25 # IDLVersionList
27 # 26 #
28 # IDLVersionList is a list based container for holding IDLVersion 27 # IDLVersionList is a list based container for holding IDLVersion
29 # objects in order. The IDLVersionList can be added to, and searched by 28 # objects in order. The IDLVersionList can be added to, and searched by
30 # range. Objects are stored in order, and must be added in order. 29 # range. Objects are stored in order, and must be added in order.
31 # 30 #
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 339
341 if errors: 340 if errors:
342 print 'Test failed with %d errors.' % errors 341 print 'Test failed with %d errors.' % errors
343 else: 342 else:
344 print 'Passed.' 343 print 'Passed.'
345 return errors 344 return errors
346 345
347 if __name__ == '__main__': 346 if __name__ == '__main__':
348 sys.exit(Main(sys.argv[1:])) 347 sys.exit(Main(sys.argv[1:]))
349 348
OLDNEW
« no previous file with comments | « ppapi/generators/idl_generator.py ('k') | ppapi/generators/test_cgen/enum_typedef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698