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

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

Issue 10860064: Remove semicolon. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | 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 the systems to generate 6 """This module provides shared functionality for the systems to generate
7 native binding from the IDL database.""" 7 native binding from the IDL database."""
8 8
9 import emitter 9 import emitter
10 import os 10 import os
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 (IsOptional(argument) and not self._IsArgumentOptionalInWebCore(node, argument)) or (argument.ext_attrs.get('Optional') == 'DefaultIsNullString'), 837 (IsOptional(argument) and not self._IsArgumentOptionalInWebCore(node, argument)) or (argument.ext_attrs.get('Optional') == 'DefaultIsNullString'),
838 # TODO(antonm): all IDs should be renamed when database is generated. 838 # TODO(antonm): all IDs should be renamed when database is generated.
839 # That will allow to get rid of argument_name argument altogether. 839 # That will allow to get rid of argument_name argument altogether.
840 DartDomNameOfAttribute(argument), 840 DartDomNameOfAttribute(argument),
841 'Dart_GetNativeArgument(args, %i)' % (start_index + i), 841 'Dart_GetNativeArgument(args, %i)' % (start_index + i),
842 self._interface.id)) 842 self._interface.id))
843 843
844 body_emitter.Emit('\n') 844 body_emitter.Emit('\n')
845 845
846 if 'NeedsUserGestureCheck' in ext_attrs: 846 if 'NeedsUserGestureCheck' in ext_attrs:
847 cpp_arguments.append('DartUtilities::processingUserGesture'); 847 cpp_arguments.append('DartUtilities::processingUserGesture')
848 848
849 invocation_emitter = body_emitter 849 invocation_emitter = body_emitter
850 if raises_dom_exception: 850 if raises_dom_exception:
851 cpp_arguments.append('ec') 851 cpp_arguments.append('ec')
852 invocation_emitter = body_emitter.Emit( 852 invocation_emitter = body_emitter.Emit(
853 ' ExceptionCode ec = 0;\n' 853 ' ExceptionCode ec = 0;\n'
854 '$!INVOCATION' 854 '$!INVOCATION'
855 ' if (UNLIKELY(ec)) {\n' 855 ' if (UNLIKELY(ec)) {\n'
856 ' exception = DartDOMWrapper::exceptionCodeToDartException(ec );\n' 856 ' exception = DartDOMWrapper::exceptionCodeToDartException(ec );\n'
857 ' goto fail;\n' 857 ' goto fail;\n'
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 parent_interface = _FindInHierarchy(database, parent_interface, test) 949 parent_interface = _FindInHierarchy(database, parent_interface, test)
950 if parent_interface: 950 if parent_interface:
951 return parent_interface 951 return parent_interface
952 952
953 def _ToWebKitName(name): 953 def _ToWebKitName(name):
954 name = name[0].lower() + name[1:] 954 name = name[0].lower() + name[1:]
955 name = re.sub(r'^(hTML|uRL|jS|xML|xSLT)', lambda s: s.group(1).lower(), 955 name = re.sub(r'^(hTML|uRL|jS|xML|xSLT)', lambda s: s.group(1).lower(),
956 name) 956 name)
957 return re.sub(r'^(create|exclusive)', lambda s: 'is' + s.group(1).capitalize() , 957 return re.sub(r'^(create|exclusive)', lambda s: 'is' + s.group(1).capitalize() ,
958 name) 958 name)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698