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