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

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

Issue 9051008: Parse 'static' qualifier in IDL. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 | client/dom/scripts/idlparser.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 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 373
374 class IDLOperation(IDLMember): 374 class IDLOperation(IDLMember):
375 """IDLNode specialization for 'type name(args)' declarations.""" 375 """IDLNode specialization for 'type name(args)' declarations."""
376 def __init__(self, ast): 376 def __init__(self, ast):
377 IDLMember.__init__(self, ast) 377 IDLMember.__init__(self, ast)
378 self.type = self._convert_first(ast, 'ReturnType', IDLType) 378 self.type = self._convert_first(ast, 'ReturnType', IDLType)
379 self.arguments = self._convert_all(ast, 'Argument', IDLArgument) 379 self.arguments = self._convert_all(ast, 'Argument', IDLArgument)
380 self.raises = self._convert_first(ast, 'Raises', IDLType) 380 self.raises = self._convert_first(ast, 'Raises', IDLType)
381 self.specials = self._find_all(ast, 'Special') 381 self.specials = self._find_all(ast, 'Special')
382 self.is_stringifier = self._has(ast, 'Stringifier') 382 self.is_stringifier = self._has(ast, 'Stringifier')
383 self.is_static = self._has(ast, 'Static')
383 def _extra_repr(self): 384 def _extra_repr(self):
384 return [self.arguments] 385 return [self.arguments]
385 386
386 387
387 class IDLAttribute(IDLMember): 388 class IDLAttribute(IDLMember):
388 """IDLNode specialization for 'attribute type name' declarations.""" 389 """IDLNode specialization for 'attribute type name' declarations."""
389 def __init__(self, ast): 390 def __init__(self, ast):
390 IDLMember.__init__(self, ast) 391 IDLMember.__init__(self, ast)
391 self.is_read_only = self._has(ast, 'ReadOnly') 392 self.is_read_only = self._has(ast, 'ReadOnly')
392 # There are various ways to define exceptions for attributes: 393 # There are various ways to define exceptions for attributes:
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 """IDLDictNode specialization for one annotation.""" 460 """IDLDictNode specialization for one annotation."""
460 def __init__(self, ast=None): 461 def __init__(self, ast=None):
461 IDLDictNode.__init__(self, ast) 462 IDLDictNode.__init__(self, ast)
462 self.id = None 463 self.id = None
463 if not ast: 464 if not ast:
464 return 465 return
465 for arg in self._find_all(ast, 'AnnotationArg'): 466 for arg in self._find_all(ast, 'AnnotationArg'):
466 name = self._find_first(arg, 'Id') 467 name = self._find_first(arg, 'Id')
467 value = self._find_first(arg, 'AnnotationArgValue') 468 value = self._find_first(arg, 'AnnotationArgValue')
468 self[name] = value 469 self[name] = value
OLDNEW
« no previous file with comments | « no previous file | client/dom/scripts/idlparser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698