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

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

Issue 10800104: Convert DOM and HTML frog to dart2js. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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/dartdomgenerator.py ('k') | lib/dom/scripts/generator.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 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
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
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
OLDNEW
« no previous file with comments | « lib/dom/scripts/dartdomgenerator.py ('k') | lib/dom/scripts/generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698