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

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

Issue 1720743005: Generation of sdk/lib files from 45 roll (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged with TOT Created 4 years, 10 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
« no previous file with comments | « tools/dom/scripts/dartdomgenerator.py ('k') | tools/dom/scripts/dartmetadata.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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 call_with = operation.ext_attrs.get('CallWith', []) 237 call_with = operation.ext_attrs.get('CallWith', [])
238 if not(isinstance(call_with, list)): 238 if not(isinstance(call_with, list)):
239 call_with = [call_with] 239 call_with = [call_with]
240 constructor_with = operation.ext_attrs.get('ConstructorCallWith', []) 240 constructor_with = operation.ext_attrs.get('ConstructorCallWith', [])
241 if not(isinstance(constructor_with, list)): 241 if not(isinstance(constructor_with, list)):
242 constructor_with = [constructor_with] 242 constructor_with = [constructor_with]
243 call_with = call_with + constructor_with 243 call_with = call_with + constructor_with
244 244
245 if 'ScriptArguments' in call_with: 245 if 'ScriptArguments' in call_with:
246 operation.arguments.append(ARG) 246 operation.arguments.append(ARG)
247
248 # TODO(terry): Hack to remove 3rd arguments in setInterval/setTimeout.
249 def HackCleanupTimers(self, database):
250 for interface in database.GetInterfaces():
251 for operation in interface.operations:
252 if ((operation.id == 'setInterval' or operation.id == 'setTimeout') and \
253 operation.arguments[0].type.id == 'any'):
254 operation.arguments.pop(2)
OLDNEW
« no previous file with comments | « tools/dom/scripts/dartdomgenerator.py ('k') | tools/dom/scripts/dartmetadata.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698