| 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 """ | 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 Loading... |
| 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 |
| OLD | NEW |