| OLD | NEW |
| 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 generates Dart APIs from the IDL database.""" | 6 """This module generates Dart APIs from the IDL database.""" |
| 7 | 7 |
| 8 import emitter | 8 import emitter |
| 9 import idlnode | 9 import idlnode |
| 10 import logging | 10 import logging |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 # Collect interfaces | 195 # Collect interfaces |
| 196 interfaces = [] | 196 interfaces = [] |
| 197 for interface in database.GetInterfaces(): | 197 for interface in database.GetInterfaces(): |
| 198 if not MatchSourceFilter(interface): | 198 if not MatchSourceFilter(interface): |
| 199 # Skip this interface since it's not present in the required source | 199 # Skip this interface since it's not present in the required source |
| 200 _logger.info('Omitting interface - %s' % interface.id) | 200 _logger.info('Omitting interface - %s' % interface.id) |
| 201 continue | 201 continue |
| 202 interfaces.append(interface) | 202 interfaces.append(interface) |
| 203 | 203 |
| 204 # TODO(sra): Use this list of exception names to generate information to | 204 # TODO(sra): Use this list of exception names to generate information to |
| 205 # tell Frog which exceptions can be passed from JS to Dart code. | 205 # tell dart2js which exceptions can be passed from JS to Dart code. |
| 206 exceptions = self._CollectExceptions(interfaces) | 206 exceptions = self._CollectExceptions(interfaces) |
| 207 | 207 |
| 208 super_map = dict((v, k) for k, v in webkit_renames.iteritems()) | 208 super_map = dict((v, k) for k, v in webkit_renames.iteritems()) |
| 209 | 209 |
| 210 # Render all interfaces into Dart and save them in files. | 210 # Render all interfaces into Dart and save them in files. |
| 211 for interface in self._PreOrderInterfaces(interfaces): | 211 for interface in self._PreOrderInterfaces(interfaces): |
| 212 | 212 |
| 213 super_name = interface.id | 213 super_name = interface.id |
| 214 | 214 |
| 215 if super_name in super_map: | 215 if super_name in super_map: |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 PARAMETERS=constructor_info.ParametersImplementationDeclaration(DartType
)) | 338 PARAMETERS=constructor_info.ParametersImplementationDeclaration(DartType
)) |
| 339 | 339 |
| 340 def FinishInterface(self): | 340 def FinishInterface(self): |
| 341 pass | 341 pass |
| 342 | 342 |
| 343 def AddTypedArrayConstructors(self, element_type): | 343 def AddTypedArrayConstructors(self, element_type): |
| 344 pass | 344 pass |
| 345 | 345 |
| 346 def AddEventAttributes(self, event_attrs): | 346 def AddEventAttributes(self, event_attrs): |
| 347 pass | 347 pass |
| OLD | NEW |