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

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

Issue 10918167: Return to old getter syntax for get foo native 'JS body' case. (Closed) Base URL: https://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/html/dart2js/html_dart2js.dart ('k') | no next file » | 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 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 self._AddRenamingGetter(attribute, html_name) 958 self._AddRenamingGetter(attribute, html_name)
959 if not read_only: 959 if not read_only:
960 self._AddRenamingSetter(attribute, html_name) 960 self._AddRenamingSetter(attribute, html_name)
961 961
962 def _AddRenamingGetter(self, attr, html_name): 962 def _AddRenamingGetter(self, attr, html_name):
963 conversion = self._OutputConversion(attr.type.id, attr.id) 963 conversion = self._OutputConversion(attr.type.id, attr.id)
964 if conversion: 964 if conversion:
965 return self._AddConvertingGetter(attr, html_name, conversion) 965 return self._AddConvertingGetter(attr, html_name, conversion)
966 return_type = self._NarrowOutputType(attr.type.id) 966 return_type = self._NarrowOutputType(attr.type.id)
967 self._members_emitter.Emit( 967 self._members_emitter.Emit(
968 '\n $TYPE get $HTML_NAME native "return this.$NAME;";\n', 968 '\n $TYPE get $HTML_NAME() native "return this.$NAME;";\n',
969 HTML_NAME=html_name, 969 HTML_NAME=html_name,
970 NAME=attr.id, 970 NAME=attr.id,
971 TYPE=return_type) 971 TYPE=return_type)
972 972
973 def _AddRenamingSetter(self, attr, html_name): 973 def _AddRenamingSetter(self, attr, html_name):
974 conversion = self._InputConversion(attr.type.id, attr.id) 974 conversion = self._InputConversion(attr.type.id, attr.id)
975 if conversion: 975 if conversion:
976 return self._AddConvertingSetter(attr, html_name, conversion) 976 return self._AddConvertingSetter(attr, html_name, conversion)
977 self._members_emitter.Emit( 977 self._members_emitter.Emit(
978 '\n void set $HTML_NAME($TYPE value)' 978 '\n void set $HTML_NAME($TYPE value)'
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 return HtmlDart2JSClassGenerator(self, interface) 1233 return HtmlDart2JSClassGenerator(self, interface)
1234 1234
1235 def GenerateLibraries(self, dart_files): 1235 def GenerateLibraries(self, dart_files):
1236 self._GenerateLibFile( 1236 self._GenerateLibFile(
1237 'html_dart2js.darttemplate', 1237 'html_dart2js.darttemplate',
1238 os.path.join(self._output_dir, 'html_dart2js.dart'), 1238 os.path.join(self._output_dir, 'html_dart2js.dart'),
1239 dart_files) 1239 dart_files)
1240 1240
1241 def Finish(self): 1241 def Finish(self):
1242 pass 1242 pass
OLDNEW
« no previous file with comments | « lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698