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

Unified Diff: lib/html/scripts/systemhtml.py

Issue 11191026: Unify formatting of parameters in interfaces and implementing classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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/html/scripts/systemhtml.py
diff --git a/lib/html/scripts/systemhtml.py b/lib/html/scripts/systemhtml.py
index 40d04076105d93fcabce206c20ae1d52929ed8c5..46904c2da099a2daffeb1a62db317ca0e40f3b3e 100644
--- a/lib/html/scripts/systemhtml.py
+++ b/lib/html/scripts/systemhtml.py
@@ -185,7 +185,7 @@ def EmitHtmlElementFactoryConstructors(emitter, infos, typename, class_name,
CONSTRUCTOR=constructor_info.ConstructorFactoryName(rename_type),
CLASS=class_name,
TAG=info.tag,
- PARAMS=constructor_info.ParametersInterfaceDeclaration(rename_type))
+ PARAMS=constructor_info.ParametersDeclaration(rename_type))
for param in constructor_info.param_infos:
inits.Emit(' if ($E != null) _e.$E = $E;\n', E=param.name)
@@ -223,7 +223,7 @@ class HtmlDartInterfaceGenerator(object):
code.Emit('typedef $TYPE $NAME($PARAMS);\n',
NAME=self._interface.id,
TYPE=self._DartType(info.type_name),
- PARAMS=info.ParametersImplementationDeclaration(self._DartType))
+ PARAMS=info.ParametersDeclaration(self._DartType))
self._backend.GenerateCallback(info)
def GenerateInterface(self):
@@ -493,7 +493,7 @@ class HtmlDartInterfaceGenerator(object):
' $TYPE $NAME($PARAMS);\n',
TYPE=SecureOutputType(self, info.type_name),
NAME=html_name,
- PARAMS=info.ParametersInterfaceDeclaration(self._DartType))
+ PARAMS=info.ParametersDeclaration(self._DartType))
self._backend.AddOperation(info, html_name)
def AddSecondaryOperation(self, interface, info):
@@ -651,7 +651,7 @@ class Dart2JSBackend(object):
template,
FACTORYPROVIDER=factory_provider,
CONSTRUCTOR=self._html_interface_name,
- PARAMETERS=constructor_info.ParametersImplementationDeclaration(self._DartType),
+ PARAMETERS=constructor_info.ParametersDeclaration(self._DartType),
NAMED_CONSTRUCTOR=constructor_info.name or self._html_interface_name,
ARGUMENTS=arguments,
PRE_ARGUMENTS_COMMA=comma,
@@ -854,7 +854,7 @@ class Dart2JSBackend(object):
TYPE=return_type,
HTML_NAME=html_name,
NAME=info.declared_name,
- PARAMS=info.ParametersImplementationDeclaration(
+ PARAMS=info.ParametersDeclaration(
lambda type_name: self._NarrowInputType(type_name)))
operation_emitter.Emit(
@@ -868,7 +868,7 @@ class Dart2JSBackend(object):
MODIFIERS='static ' if info.IsStatic() else '',
TYPE=self._NarrowOutputType(info.type_name),
NAME=info.name,
- PARAMS=info.ParametersImplementationDeclaration(
+ PARAMS=info.ParametersDeclaration(
lambda type_name: self._NarrowInputType(type_name)))
def _AddOperationWithConversions(self, info, html_name):
@@ -899,7 +899,7 @@ class Dart2JSBackend(object):
MODIFIERS='static ' if info.IsStatic() else '',
TYPE=return_type,
HTML_NAME=html_name,
- PARAMS=info.ParametersImplementationDeclaration(InputType))
+ PARAMS=info.ParametersDeclaration(InputType))
parameter_names = [param_info.name for param_info in info.param_infos]
parameter_types = [InputType(param_info.type_id)

Powered by Google App Engine
This is Rietveld 408576698