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

Side by Side Diff: lib/dom/scripts/systemhtml.py

Issue 10880068: - Change "static final" to "static const" in the lib/ directory. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « lib/dom/scripts/systemdart2js.py ('k') | lib/dom/scripts/systeminterface.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 for the system to generate 6 """This module provides shared functionality for the system to generate
7 Dart:html APIs from the IDL database.""" 7 Dart:html APIs from the IDL database."""
8 8
9 import emitter 9 import emitter
10 10
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 662
663 def AddSecondaryOperation(self, interface, info): 663 def AddSecondaryOperation(self, interface, info):
664 self._backend.SecondaryContext(interface) 664 self._backend.SecondaryContext(interface)
665 self.AddOperation(info, True) 665 self.AddOperation(info, True)
666 666
667 def FinishInterface(self): 667 def FinishInterface(self):
668 self._backend.FinishInterface() 668 self._backend.FinishInterface()
669 669
670 def AddConstant(self, constant): 670 def AddConstant(self, constant):
671 type = TypeOrNothing(self._DartType(constant.type.id), constant.type.id) 671 type = TypeOrNothing(self._DartType(constant.type.id), constant.type.id)
672 self._members_emitter.Emit('\n static final $TYPE$NAME = $VALUE;\n', 672 self._members_emitter.Emit('\n static const $TYPE$NAME = $VALUE;\n',
673 NAME=constant.id, 673 NAME=constant.id,
674 TYPE=type, 674 TYPE=type,
675 VALUE=constant.value) 675 VALUE=constant.value)
676 self._backend.AddConstant(constant) 676 self._backend.AddConstant(constant)
677 677
678 def _GenerateEvents(self): 678 def _GenerateEvents(self):
679 emit_events, event_attrs = self._shared.GetEventAttributes(self._interface) 679 emit_events, event_attrs = self._shared.GetEventAttributes(self._interface)
680 if not emit_events: 680 if not emit_events:
681 return 681 return
682 682
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 return HtmlDart2JSClassGenerator(self, interface) 1228 return HtmlDart2JSClassGenerator(self, interface)
1229 1229
1230 def GenerateLibraries(self, dart_files): 1230 def GenerateLibraries(self, dart_files):
1231 self._GenerateLibFile( 1231 self._GenerateLibFile(
1232 'html_dart2js.darttemplate', 1232 'html_dart2js.darttemplate',
1233 os.path.join(self._output_dir, 'html_dart2js.dart'), 1233 os.path.join(self._output_dir, 'html_dart2js.dart'),
1234 dart_files) 1234 dart_files)
1235 1235
1236 def Finish(self): 1236 def Finish(self):
1237 pass 1237 pass
OLDNEW
« no previous file with comments | « lib/dom/scripts/systemdart2js.py ('k') | lib/dom/scripts/systeminterface.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698