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

Side by Side Diff: tools/dom/scripts/systemhtml.py

Issue 15850004: Verify that correct number of arguments was passed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 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 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 TARGET=target, 1002 TARGET=target,
1003 PARAMS=', '.join(target_parameters)) 1003 PARAMS=', '.join(target_parameters))
1004 1004
1005 declaration = '%s%s%s %s(%s)' % ( 1005 declaration = '%s%s%s %s(%s)' % (
1006 self._Metadata(info.type_name, info.declared_name), 1006 self._Metadata(info.type_name, info.declared_name),
1007 'static ' if info.IsStatic() else '', 1007 'static ' if info.IsStatic() else '',
1008 return_type, 1008 return_type,
1009 html_name, 1009 html_name,
1010 info.ParametersDeclaration(InputType)) 1010 info.ParametersDeclaration(InputType))
1011 self._GenerateDispatcherBody( 1011 self._GenerateDispatcherBody(
1012 info,
1012 operations, 1013 operations,
1013 parameter_names,
1014 declaration, 1014 declaration,
1015 GenerateCall, 1015 GenerateCall,
1016 lambda _, argument: IsOptional(argument), 1016 lambda _, argument: IsOptional(argument),
1017 can_omit_type_check=lambda type, pos: type == parameter_types[pos]) 1017 can_omit_type_check=lambda type, pos: type == parameter_types[pos])
1018 1018
1019 def _AddInterfaceOperation(self, info, html_name): 1019 def _AddInterfaceOperation(self, info, html_name):
1020 self._members_emitter.Emit( 1020 self._members_emitter.Emit(
1021 '\n' 1021 '\n'
1022 ' $TYPE $NAME($PARAMS);\n', 1022 ' $TYPE $NAME($PARAMS);\n',
1023 TYPE=self.SecureOutputType(info.type_name), 1023 TYPE=self.SecureOutputType(info.type_name),
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 for library_name in libraries: 1174 for library_name in libraries:
1175 self._libraries[library_name] = DartLibrary( 1175 self._libraries[library_name] = DartLibrary(
1176 library_name, template_loader, library_type, output_dir) 1176 library_name, template_loader, library_type, output_dir)
1177 1177
1178 def AddFile(self, basename, library_name, path): 1178 def AddFile(self, basename, library_name, path):
1179 self._libraries[library_name].AddFile(path) 1179 self._libraries[library_name].AddFile(path)
1180 1180
1181 def Emit(self, emitter, auxiliary_dir): 1181 def Emit(self, emitter, auxiliary_dir):
1182 for lib in self._libraries.values(): 1182 for lib in self._libraries.values():
1183 lib.Emit(emitter, auxiliary_dir) 1183 lib.Emit(emitter, auxiliary_dir)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698