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

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

Issue 14150007: Drop raises annotations support. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
« no previous file with comments | « tools/dom/scripts/dartgenerator.py ('k') | tools/dom/scripts/idlnode.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 provides shared functionality for systems to generate 6 """This module provides shared functionality for systems to generate
7 Dart APIs from the IDL database.""" 7 Dart APIs from the IDL database."""
8 8
9 import copy 9 import copy
10 import json 10 import json
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1402 'ObjectArray': TypeData(clazz='Primitive', dart_type='List'), 1402 'ObjectArray': TypeData(clazz='Primitive', dart_type='List'),
1403 'PositionOptions': TypeData(clazz='Primitive', dart_type='Object'), 1403 'PositionOptions': TypeData(clazz='Primitive', dart_type='Object'),
1404 # TODO(sra): Come up with some meaningful name so that where this appears in 1404 # TODO(sra): Come up with some meaningful name so that where this appears in
1405 # the documentation, the user is made aware that only a limited subset of 1405 # the documentation, the user is made aware that only a limited subset of
1406 # serializable types are actually permitted. 1406 # serializable types are actually permitted.
1407 'SerializedScriptValue': TypeData(clazz='Primitive', dart_type='dynamic'), 1407 'SerializedScriptValue': TypeData(clazz='Primitive', dart_type='dynamic'),
1408 'sequence': TypeData(clazz='Primitive', dart_type='List'), 1408 'sequence': TypeData(clazz='Primitive', dart_type='List'),
1409 'void': TypeData(clazz='Primitive', dart_type='void'), 1409 'void': TypeData(clazz='Primitive', dart_type='void'),
1410 1410
1411 'CSSRule': TypeData(clazz='Interface', conversion_includes=['CSSImportRule'] ), 1411 'CSSRule': TypeData(clazz='Interface', conversion_includes=['CSSImportRule'] ),
1412 'DOMException': TypeData(clazz='Interface', native_type='DOMCoreException'),
1413 'DOMStringMap': TypeData(clazz='Interface', dart_type='Map<String, String>') , 1412 'DOMStringMap': TypeData(clazz='Interface', dart_type='Map<String, String>') ,
1414 'DOMWindow': TypeData(clazz='Interface', custom_to_dart=True), 1413 'DOMWindow': TypeData(clazz='Interface', custom_to_dart=True),
1415 'Element': TypeData(clazz='Interface', merged_interface='HTMLElement', 1414 'Element': TypeData(clazz='Interface', merged_interface='HTMLElement',
1416 custom_to_dart=True), 1415 custom_to_dart=True),
1417 'EventListener': TypeData(clazz='Interface', custom_to_native=True), 1416 'EventListener': TypeData(clazz='Interface', custom_to_native=True),
1418 'EventTarget': TypeData(clazz='Interface', custom_to_native=True), 1417 'EventTarget': TypeData(clazz='Interface', custom_to_native=True),
1419 'HTMLElement': TypeData(clazz='Interface', merged_into='Element', 1418 'HTMLElement': TypeData(clazz='Interface', merged_into='Element',
1420 custom_to_dart=True), 1419 custom_to_dart=True),
1421 'IDBAny': TypeData(clazz='Interface', dart_type='dynamic', custom_to_native= True), 1420 'IDBAny': TypeData(clazz='Interface', dart_type='dynamic', custom_to_native= True),
1422 'MutationRecordArray': TypeData(clazz='Interface', # C++ pass by pointer. 1421 'MutationRecordArray': TypeData(clazz='Interface', # C++ pass by pointer.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 self) 1559 self)
1561 1560
1562 if type_data.clazz == 'SVGTearOff': 1561 if type_data.clazz == 'SVGTearOff':
1563 dart_interface_name = self._renamer.RenameInterface( 1562 dart_interface_name = self._renamer.RenameInterface(
1564 self._database.GetInterface(type_name)) 1563 self._database.GetInterface(type_name))
1565 return SVGTearOffIDLTypeInfo( 1564 return SVGTearOffIDLTypeInfo(
1566 type_name, type_data, dart_interface_name, self) 1565 type_name, type_data, dart_interface_name, self)
1567 1566
1568 class_name = '%sIDLTypeInfo' % type_data.clazz 1567 class_name = '%sIDLTypeInfo' % type_data.clazz
1569 return globals()[class_name](type_name, type_data) 1568 return globals()[class_name](type_name, type_data)
OLDNEW
« no previous file with comments | « tools/dom/scripts/dartgenerator.py ('k') | tools/dom/scripts/idlnode.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698