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

Unified Diff: lib/dom/scripts/systembase.py

Issue 10702202: Introduce TypeRegistry 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 side-by-side diff with in-line comments
Download patch
Index: lib/dom/scripts/systembase.py
diff --git a/lib/dom/scripts/systembase.py b/lib/dom/scripts/systembase.py
index f394e584e8018116bf04c0634fcac15eea835708..0ce588d0b1e2a1b8ec2e6303b24a1f79ac6a1e9f 100644
--- a/lib/dom/scripts/systembase.py
+++ b/lib/dom/scripts/systembase.py
@@ -24,11 +24,12 @@ class System(object):
- Finish
"""
- def __init__(self, templates, database, emitters, output_dir):
- self._templates = templates
- self._database = database
- self._emitters = emitters
- self._output_dir = output_dir
+ def __init__(self, context):
+ self._templates = context.templates
+ self._database = context.database
+ self._emitters = context.emitters
+ self._type_registry = context.type_registry
+ self._output_dir = context.output_dir
def ProcessInterface(self, interface):
"""Processes an interface that is not a callback function."""
@@ -221,6 +222,14 @@ class BaseGenerator(object):
walk(interface.parents[1:])
return result
+class GeneratorContext(object):
Anton Muhin 2012/07/13 15:18:55 GeneratorOptions? GeneratorParameters? Context i
podivilov 2012/07/13 16:05:21 Done.
+ def __init__(self, templates, database, emitters, type_registry, output_dir):
+ self.templates = templates
+ self.database = database
+ self.emitters = emitters
+ self.type_registry = type_registry
+ self.output_dir = output_dir
+
def IsReadOnly(attribute):
return attribute.is_read_only or 'Replaceable' in attribute.ext_attrs

Powered by Google App Engine
This is Rietveld 408576698