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

Side by Side Diff: tools/dom/scripts/dartmetadata.py

Issue 16677011: Updating metadata after Chrome rolls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | « tools/dom/dom.json ('k') | tools/dom/scripts/htmleventgenerator.py » ('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 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This module provides shared functionality to provide Dart metadata for 6 """This module provides shared functionality to provide Dart metadata for
7 DOM APIs. 7 DOM APIs.
8 """ 8 """
9 9
10 import copy 10 import copy
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 elif dart_action == 'experimental': 718 elif dart_action == 'experimental':
719 if comment: 719 if comment:
720 annotations.append('// %s' % comment) 720 annotations.append('// %s' % comment)
721 annotations.append('@Experimental // %s' % support_level) 721 annotations.append('@Experimental // %s' % support_level)
722 elif dart_action == 'suppress': 722 elif dart_action == 'suppress':
723 if comment: 723 if comment:
724 annotations.append('// %s' % comment) 724 annotations.append('// %s' % comment)
725 annotations.append('@deprecated // %s' % support_level) 725 annotations.append('@deprecated // %s' % support_level)
726 # TODO (blois): suppress generation of these APIs as a separate CL. 726 # TODO (blois): suppress generation of these APIs as a separate CL.
727 pass 727 pass
728 elif dart_action == 'stable':
729 pass
728 else: 730 else:
729 _logger.warn('Unknown dart_action - %s:%s' % (interface_id, member_id)) 731 _logger.warn('Unknown dart_action - %s:%s' % (interface_id, member_id))
730 elif support_level == 'untriaged': 732 elif support_level == 'untriaged':
731 annotations.append('@Experimental // untriaged') 733 annotations.append('@Experimental // untriaged')
732 elif support_level == 'experimental': 734 elif support_level == 'experimental':
733 if comment: 735 if comment:
734 annotations.append('// %s' % comment) 736 annotations.append('// %s' % comment)
735 annotations.append('@Experimental') 737 annotations.append('@Experimental')
736 elif support_level == 'nonstandard': 738 elif support_level == 'nonstandard':
737 if comment: 739 if comment:
738 annotations.append('// %s' % comment) 740 annotations.append('// %s' % comment)
739 annotations.append('@Experimental // non-standard') 741 annotations.append('@Experimental // non-standard')
740 elif support_level == 'stable': 742 elif support_level == 'stable':
741 pass 743 pass
742 elif support_level == 'deprecated': 744 elif support_level == 'deprecated':
743 if comment: 745 if comment:
744 annotations.append('// %s' % comment) 746 annotations.append('// %s' % comment)
745 annotations.append('@deprecated') 747 annotations.append('@deprecated')
746 elif support_level is None: 748 elif support_level is None:
747 pass 749 pass
748 else: 750 else:
749 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) 751 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id))
750 752
751 return annotations 753 return annotations
752 754
753 def Flush(self): 755 def Flush(self):
754 json_file = open(self._api_status_path, 'w+') 756 json_file = open(self._api_status_path, 'w+')
755 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key s=True) 757 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key s=True)
756 json_file.close() 758 json_file.close()
OLDNEW
« no previous file with comments | « tools/dom/dom.json ('k') | tools/dom/scripts/htmleventgenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698