| 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 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 import monitored | 10 import monitored |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 | 521 |
| 522 implements_str = '' | 522 implements_str = '' |
| 523 if implements: | 523 if implements: |
| 524 implements_str = ' implements ' + ', '.join(set(implements)) | 524 implements_str = ' implements ' + ', '.join(set(implements)) |
| 525 | 525 |
| 526 mixins = self._backend.Mixins() | 526 mixins = self._backend.Mixins() |
| 527 mixins_str = '' | 527 mixins_str = '' |
| 528 if mixins: | 528 if mixins: |
| 529 mixins_str = ' with ' + ', '.join(mixins) | 529 mixins_str = ' with ' + ', '.join(mixins) |
| 530 if not base_class: | 530 if not base_class: |
| 531 base_class = 'Object' | 531 base_class = 'Interceptor' |
| 532 | 532 |
| 533 annotations = self._metadata.GetFormattedMetadata( | 533 annotations = self._metadata.GetFormattedMetadata( |
| 534 self._library_name, self._interface, None, '') | 534 self._library_name, self._interface, None, '') |
| 535 | 535 |
| 536 class_modifiers = '' | 536 class_modifiers = '' |
| 537 if self._renamer.ShouldSuppressInterface(self._interface): | 537 if self._renamer.ShouldSuppressInterface(self._interface): |
| 538 class_modifiers = 'abstract ' | 538 class_modifiers = 'abstract ' |
| 539 | 539 |
| 540 self._implementation_members_emitter = implementation_emitter.Emit( | 540 self._implementation_members_emitter = implementation_emitter.Emit( |
| 541 self._backend.ImplementationTemplate(), | 541 self._backend.ImplementationTemplate(), |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1171 for library_name in libraries: | 1171 for library_name in libraries: |
| 1172 self._libraries[library_name] = DartLibrary( | 1172 self._libraries[library_name] = DartLibrary( |
| 1173 library_name, template_loader, library_type, output_dir) | 1173 library_name, template_loader, library_type, output_dir) |
| 1174 | 1174 |
| 1175 def AddFile(self, basename, library_name, path): | 1175 def AddFile(self, basename, library_name, path): |
| 1176 self._libraries[library_name].AddFile(path) | 1176 self._libraries[library_name].AddFile(path) |
| 1177 | 1177 |
| 1178 def Emit(self, emitter, auxiliary_dir): | 1178 def Emit(self, emitter, auxiliary_dir): |
| 1179 for lib in self._libraries.values(): | 1179 for lib in self._libraries.values(): |
| 1180 lib.Emit(emitter, auxiliary_dir) | 1180 lib.Emit(emitter, auxiliary_dir) |
| OLD | NEW |