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

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

Issue 23819035: Give generatored bindings classes a field remembering an index into a cache of handles on the corre… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: run go.sh Created 7 years, 3 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
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 os 6 import os
7 import sys 7 import sys
8 8
9
10 class IDLNode(object): 9 class IDLNode(object):
11 """Base class for all IDL elements. 10 """Base class for all IDL elements.
12 IDLNode may contain various child nodes, and have properties. Examples 11 IDLNode may contain various child nodes, and have properties. Examples
13 of IDLNode are interfaces, interface members, function arguments, 12 of IDLNode are interfaces, interface members, function arguments,
14 etc. 13 etc.
15 """ 14 """
16 15
17 def __init__(self, ast): 16 def __init__(self, ast):
18 """Initializes an IDLNode from a PegParser AST output.""" 17 """Initializes an IDLNode from a PegParser AST output."""
19 self.id = self._find_first(ast, 'Id') if ast is not None else None 18 self.id = self._find_first(ast, 'Id') if ast is not None else None
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 """IDLDictNode specialization for one annotation.""" 560 """IDLDictNode specialization for one annotation."""
562 def __init__(self, ast=None): 561 def __init__(self, ast=None):
563 IDLDictNode.__init__(self, ast) 562 IDLDictNode.__init__(self, ast)
564 self.id = None 563 self.id = None
565 if not ast: 564 if not ast:
566 return 565 return
567 for arg in self._find_all(ast, 'AnnotationArg'): 566 for arg in self._find_all(ast, 'AnnotationArg'):
568 name = self._find_first(arg, 'Id') 567 name = self._find_first(arg, 'Id')
569 value = self._find_first(arg, 'AnnotationArgValue') 568 value = self._find_first(arg, 'AnnotationArgValue')
570 self[name] = value 569 self[name] = value
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698