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

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

Issue 8588010: Regenerate from IDL with LANGUAGE_JAVASCRIPT on (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Map Array to List Created 9 years, 1 month 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 | « client/dom/generated/wrapping_dom_externs.js ('k') | client/dom/scripts/fremontcutbuilder.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) 2011, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2011, 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 21 matching lines...) Expand all
32 'float': 'num', 32 'float': 'num',
33 'int': 'int', 33 'int': 'int',
34 # Map to extra precision - int is a bignum in Dart. 34 # Map to extra precision - int is a bignum in Dart.
35 'long': 'int', 35 'long': 'int',
36 'long long': 'int', 36 'long long': 'int',
37 'object': 'Object', 37 'object': 'Object',
38 # Map to extra precision - int is a bignum in Dart. 38 # Map to extra precision - int is a bignum in Dart.
39 'short': 'int', 39 'short': 'int',
40 'string': 'String', 40 'string': 'String',
41 'void': 'void', 41 'void': 'void',
42 'Array': 'List',
42 'sequence': 'List', 43 'sequence': 'List',
43 # TODO(vsm): We need to support other types. We could weaken to 44 # TODO(vsm): We need to support other types. We could weaken to
44 # Object, or inject SSV into the appropriate types. 45 # Object, or inject SSV into the appropriate types.
45 'SerializedScriptValue': 'String', 46 'SerializedScriptValue': 'String',
46 # TODO(vsm): Automatically recognize types defined in src. 47 # TODO(vsm): Automatically recognize types defined in src.
47 'TimeoutHandler': 'TimeoutHandler', 48 'TimeoutHandler': 'TimeoutHandler',
48 'RequestAnimationFrameCallback': 'RequestAnimationFrameCallback', 49 'RequestAnimationFrameCallback': 'RequestAnimationFrameCallback',
49 } 50 }
50 51
51 _dart_to_idl_type_conversions = dict((v,k) for k, v in 52 _dart_to_idl_type_conversions = dict((v,k) for k, v in
(...skipping 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after
1948 Arguments: 1949 Arguments:
1949 info: An OperationInfo object. 1950 info: An OperationInfo object.
1950 """ 1951 """
1951 # TODO(vsm): Handle overloads. 1952 # TODO(vsm): Handle overloads.
1952 self._members_emitter.Emit( 1953 self._members_emitter.Emit(
1953 '\n' 1954 '\n'
1954 ' $TYPE $NAME($ARGS) native;\n', 1955 ' $TYPE $NAME($ARGS) native;\n',
1955 TYPE=info.type_name, 1956 TYPE=info.type_name,
1956 NAME=info.name, 1957 NAME=info.name,
1957 ARGS=info.arg_implementation_declaration) 1958 ARGS=info.arg_implementation_declaration)
OLDNEW
« no previous file with comments | « client/dom/generated/wrapping_dom_externs.js ('k') | client/dom/scripts/fremontcutbuilder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698