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

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

Issue 10483004: Add PositionOptions type to registry. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 | « lib/dom/frog/dom_frog.dart ('k') | lib/html/dartium/html_dartium.dart » ('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 re 9 import re
10 10
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 'DOMObject': PrimitiveIDLTypeInfo('DOMObject', dart_type='Object', native_ty pe='ScriptValue'), 712 'DOMObject': PrimitiveIDLTypeInfo('DOMObject', dart_type='Object', native_ty pe='ScriptValue'),
713 'DOMString': PrimitiveIDLTypeInfo('DOMString', dart_type='String', native_ty pe='String'), 713 'DOMString': PrimitiveIDLTypeInfo('DOMString', dart_type='String', native_ty pe='String'),
714 # TODO(vsm): This won't actually work until we convert the Map to 714 # TODO(vsm): This won't actually work until we convert the Map to
715 # a native JS Map for JS DOM. 715 # a native JS Map for JS DOM.
716 'Dictionary': PrimitiveIDLTypeInfo('Dictionary', dart_type='Map'), 716 'Dictionary': PrimitiveIDLTypeInfo('Dictionary', dart_type='Map'),
717 # TODO(sra): Flags is really a dictionary: {create:bool, exclusive:bool} 717 # TODO(sra): Flags is really a dictionary: {create:bool, exclusive:bool}
718 # http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interfa ce 718 # http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interfa ce
719 'Flags': PrimitiveIDLTypeInfo('Flags', dart_type='Object'), 719 'Flags': PrimitiveIDLTypeInfo('Flags', dart_type='Object'),
720 'DOMTimeStamp': PrimitiveIDLTypeInfo('DOMTimeStamp', dart_type='int', native _type='unsigned long long'), 720 'DOMTimeStamp': PrimitiveIDLTypeInfo('DOMTimeStamp', dart_type='int', native _type='unsigned long long'),
721 'object': PrimitiveIDLTypeInfo('object', dart_type='Object', native_type='Sc riptValue'), 721 'object': PrimitiveIDLTypeInfo('object', dart_type='Object', native_type='Sc riptValue'),
722 'PositionOptions': PrimitiveIDLTypeInfo('PositionOptions', dart_type='Object '),
722 # TODO(sra): Come up with some meaningful name so that where this appears in 723 # TODO(sra): Come up with some meaningful name so that where this appears in
723 # the documentation, the user is made aware that only a limited subset of 724 # the documentation, the user is made aware that only a limited subset of
724 # serializable types are actually permitted. 725 # serializable types are actually permitted.
725 'SerializedScriptValue': PrimitiveIDLTypeInfo('SerializedScriptValue', dart_ type='Dynamic'), 726 'SerializedScriptValue': PrimitiveIDLTypeInfo('SerializedScriptValue', dart_ type='Dynamic'),
726 # TODO(sra): Flags is really a dictionary: {create:bool, exclusive:bool} 727 # TODO(sra): Flags is really a dictionary: {create:bool, exclusive:bool}
727 # http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interfa ce 728 # http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interfa ce
728 'WebKitFlags': PrimitiveIDLTypeInfo('WebKitFlags', dart_type='Object'), 729 'WebKitFlags': PrimitiveIDLTypeInfo('WebKitFlags', dart_type='Object'),
729 730
730 'sequence': PrimitiveIDLTypeInfo('sequence', dart_type='List'), 731 'sequence': PrimitiveIDLTypeInfo('sequence', dart_type='List'),
731 'void': PrimitiveIDLTypeInfo('void', dart_type='void'), 732 'void': PrimitiveIDLTypeInfo('void', dart_type='void'),
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 '"SVGAnimatedListPropertyTearOff.h"', 768 '"SVGAnimatedListPropertyTearOff.h"',
768 '"SVGTransformListPropertyTearOff.h"', 769 '"SVGTransformListPropertyTearOff.h"',
769 '"SVGPathSegListPropertyTearOff.h"', 770 '"SVGPathSegListPropertyTearOff.h"',
770 ] 771 ]
771 772
772 def GetIDLTypeInfo(idl_type_name): 773 def GetIDLTypeInfo(idl_type_name):
773 match = re.match(r'sequence<(\w+)>$', idl_type_name) 774 match = re.match(r'sequence<(\w+)>$', idl_type_name)
774 if match: 775 if match:
775 return SequenceIDLTypeInfo(idl_type_name, GetIDLTypeInfo(match.group(1))) 776 return SequenceIDLTypeInfo(idl_type_name, GetIDLTypeInfo(match.group(1)))
776 return _idl_type_registry.get(idl_type_name, IDLTypeInfo(idl_type_name)) 777 return _idl_type_registry.get(idl_type_name, IDLTypeInfo(idl_type_name))
OLDNEW
« no previous file with comments | « lib/dom/frog/dom_frog.dart ('k') | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698