| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # 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 |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """ Parser for PPAPI IDL """ | 6 """ Parser for PPAPI IDL """ |
| 7 | 7 |
| 8 # | 8 # |
| 9 # IDL Parser | 9 # IDL Parser |
| 10 # | 10 # |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 # Extended Attributes | 378 # Extended Attributes |
| 379 # | 379 # |
| 380 # Extended Attributes denote properties which will be applied to a node in the | 380 # Extended Attributes denote properties which will be applied to a node in the |
| 381 # AST. A list of extended attributes are denoted by a brackets '[' ... ']' | 381 # AST. A list of extended attributes are denoted by a brackets '[' ... ']' |
| 382 # enclosing a comma separated list of extended attributes in the form of: | 382 # enclosing a comma separated list of extended attributes in the form of: |
| 383 # | 383 # |
| 384 # Name | 384 # Name |
| 385 # Name=HEX | INT | OCT | FLOAT | 385 # Name=HEX | INT | OCT | FLOAT |
| 386 # Name="STRING" | 386 # Name="STRING" |
| 387 # Name=Function(arg ...) | 387 # Name=Function(arg ...) |
| 388 # TODO(noelallen) -Not currently supported: | 388 # TODO(bradnelson) -Not currently supported: |
| 389 # ** Name(arg ...) ... | 389 # ** Name(arg ...) ... |
| 390 # ** Name=Scope::Value | 390 # ** Name=Scope::Value |
| 391 # | 391 # |
| 392 # Extended Attributes are returned as a list or None. | 392 # Extended Attributes are returned as a list or None. |
| 393 | 393 |
| 394 def p_ext_attr_block(self, p): | 394 def p_ext_attr_block(self, p): |
| 395 """ext_attr_block : '[' ext_attr_list ']' | 395 """ext_attr_block : '[' ext_attr_list ']' |
| 396 | """ | 396 | """ |
| 397 if len(p) > 1: | 397 if len(p) > 1: |
| 398 p[0] = p[2] | 398 p[0] = p[2] |
| (...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1287 errs = ast.GetProperty('ERRORS') | 1287 errs = ast.GetProperty('ERRORS') |
| 1288 if errs: | 1288 if errs: |
| 1289 ErrOut.Log('Found %d error(s).' % errs); | 1289 ErrOut.Log('Found %d error(s).' % errs); |
| 1290 InfoOut.Log("%d files processed." % len(filenames)) | 1290 InfoOut.Log("%d files processed." % len(filenames)) |
| 1291 return errs | 1291 return errs |
| 1292 | 1292 |
| 1293 | 1293 |
| 1294 if __name__ == '__main__': | 1294 if __name__ == '__main__': |
| 1295 sys.exit(Main(sys.argv[1:])) | 1295 sys.exit(Main(sys.argv[1:])) |
| 1296 | 1296 |
| OLD | NEW |