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

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

Issue 10703194: Extract interfaces and members renaming logic to a new HtmlRenamer class. (Closed) Base URL: https://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
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 base functionality for systems to generate 6 """This module provides base functionality for systems to generate
7 Dart APIs from the IDL database.""" 7 Dart APIs from the IDL database."""
8 8
9 import os 9 import os
10 from generator import * 10 from generator import *
(...skipping 11 matching lines...) Expand all
22 - (InterfaceGenerator | ProcessCallback)* # for each IDL interface 22 - (InterfaceGenerator | ProcessCallback)* # for each IDL interface
23 - GenerateLibraries 23 - GenerateLibraries
24 - Finish 24 - Finish
25 """ 25 """
26 26
27 def __init__(self, options): 27 def __init__(self, options):
28 self._templates = options.templates 28 self._templates = options.templates
29 self._database = options.database 29 self._database = options.database
30 self._emitters = options.emitters 30 self._emitters = options.emitters
31 self._type_registry = options.type_registry 31 self._type_registry = options.type_registry
32 self._renamer = options.renamer
32 self._output_dir = options.output_dir 33 self._output_dir = options.output_dir
33 34
34 def ProcessInterface(self, interface): 35 def ProcessInterface(self, interface):
35 """Processes an interface that is not a callback function.""" 36 """Processes an interface that is not a callback function."""
36 pass 37 pass
37 38
38 def ProcessCallback(self, interface, info): 39 def ProcessCallback(self, interface, info):
39 """Processes an interface that is a callback function.""" 40 """Processes an interface that is a callback function."""
40 pass 41 pass
41 42
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 walk(interface.parents) 221 walk(interface.parents)
221 else: 222 else:
222 walk(interface.parents[1:]) 223 walk(interface.parents[1:])
223 return result 224 return result
224 225
225 def _DartType(self, type_name): 226 def _DartType(self, type_name):
226 return self._system._type_registry.DartType(type_name) 227 return self._system._type_registry.DartType(type_name)
227 228
228 229
229 class GeneratorOptions(object): 230 class GeneratorOptions(object):
230 def __init__(self, templates, database, emitters, type_registry, output_dir): 231 def __init__(self, templates, database, emitters, type_registry, renamer,
232 output_dir):
231 self.templates = templates 233 self.templates = templates
232 self.database = database 234 self.database = database
233 self.emitters = emitters 235 self.emitters = emitters
234 self.type_registry = type_registry 236 self.type_registry = type_registry
237 self.renamer = renamer
235 self.output_dir = output_dir 238 self.output_dir = output_dir
236 239
237 240
238 def IsReadOnly(attribute): 241 def IsReadOnly(attribute):
239 return attribute.is_read_only or 'Replaceable' in attribute.ext_attrs 242 return attribute.is_read_only or 'Replaceable' in attribute.ext_attrs
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698