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

Side by Side Diff: lib/html/scripts/idlnode.py

Issue 11036035: Fix JS native binding and documentation for interfaces with overridden name. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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/html/dartium/html_dartium.dart ('k') | 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) 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 import sys 6 import sys
7 7
8 8
9 class IDLNode(object): 9 class IDLNode(object):
10 """Base class for all IDL elements. 10 """Base class for all IDL elements.
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 class IDLInterface(IDLNode): 372 class IDLInterface(IDLNode):
373 """IDLInterface node contains operations, attributes, constants, 373 """IDLInterface node contains operations, attributes, constants,
374 as well as parent references.""" 374 as well as parent references."""
375 375
376 def __init__(self, ast): 376 def __init__(self, ast):
377 IDLNode.__init__(self, ast) 377 IDLNode.__init__(self, ast)
378 self._convert_ext_attrs(ast) 378 self._convert_ext_attrs(ast)
379 self._convert_annotations(ast) 379 self._convert_annotations(ast)
380 self.parents = self._convert_all(ast, 'ParentInterface', 380 self.parents = self._convert_all(ast, 'ParentInterface',
381 IDLParentInterface) 381 IDLParentInterface)
382 self.javascript_binding_name = self.id 382 self.javascript_binding_name = self.ext_attrs.get('InterfaceName', self.id)
383 self.doc_js_name = self.id 383 self.doc_js_name = self.ext_attrs.get('InterfaceName', self.id)
Anton Muhin 2012/10/05 11:45:22 nit: self.j_b_n = self.d_j_n = self.ext_attrs...
384 self.operations = self._convert_all(ast, 'Operation', 384 self.operations = self._convert_all(ast, 'Operation',
385 lambda ast: IDLOperation(ast, self.doc_js_name)) 385 lambda ast: IDLOperation(ast, self.doc_js_name))
386 self.attributes = self._convert_all(ast, 'Attribute', 386 self.attributes = self._convert_all(ast, 'Attribute',
387 lambda ast: IDLAttribute(ast, self.doc_js_name)) 387 lambda ast: IDLAttribute(ast, self.doc_js_name))
388 self.constants = self._convert_all(ast, 'Const', 388 self.constants = self._convert_all(ast, 'Const',
389 lambda ast: IDLConstant(ast, self.doc_js_name)) 389 lambda ast: IDLConstant(ast, self.doc_js_name))
390 self.is_supplemental = 'Supplemental' in self.ext_attrs 390 self.is_supplemental = 'Supplemental' in self.ext_attrs
391 self.is_no_interface_object = 'NoInterfaceObject' in self.ext_attrs 391 self.is_no_interface_object = 'NoInterfaceObject' in self.ext_attrs
392 self.is_fc_suppressed = 'Suppressed' in self.ext_attrs 392 self.is_fc_suppressed = 'Suppressed' in self.ext_attrs
393 393
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 """IDLDictNode specialization for one annotation.""" 509 """IDLDictNode specialization for one annotation."""
510 def __init__(self, ast=None): 510 def __init__(self, ast=None):
511 IDLDictNode.__init__(self, ast) 511 IDLDictNode.__init__(self, ast)
512 self.id = None 512 self.id = None
513 if not ast: 513 if not ast:
514 return 514 return
515 for arg in self._find_all(ast, 'AnnotationArg'): 515 for arg in self._find_all(ast, 'AnnotationArg'):
516 name = self._find_first(arg, 'Id') 516 name = self._find_first(arg, 'Id')
517 value = self._find_first(arg, 'AnnotationArgValue') 517 value = self._find_first(arg, 'AnnotationArgValue')
518 self[name] = value 518 self[name] = value
OLDNEW
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698