| OLD | NEW |
| 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 import idl_definitions | 9 import idl_definitions |
| 10 from idl_types import IdlType, IdlNullableType, IdlUnionType, IdlArrayOrSequence
Type | 10 from idl_types import IdlType, IdlNullableType, IdlUnionType, IdlArrayOrSequence
Type |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 self._find_first(func_value, 'ExtAttrArgList')) | 501 self._find_first(func_value, 'ExtAttrArgList')) |
| 502 continue | 502 continue |
| 503 | 503 |
| 504 self[name] = value | 504 self[name] = value |
| 505 | 505 |
| 506 def _all_subnodes(self): | 506 def _all_subnodes(self): |
| 507 # Extended attributes may contain IDLNodes, e.g. IDLExtAttrFunctionValue | 507 # Extended attributes may contain IDLNodes, e.g. IDLExtAttrFunctionValue |
| 508 return self.values() | 508 return self.values() |
| 509 | 509 |
| 510 | 510 |
| 511 # IDLExtAttrFunctionValue is used for constructors defined in the IDL. |
| 511 class IDLExtAttrFunctionValue(IDLNode): | 512 class IDLExtAttrFunctionValue(IDLNode): |
| 512 """IDLExtAttrFunctionValue.""" | 513 """IDLExtAttrFunctionValue.""" |
| 513 def __init__(self, func_value_ast, arg_list_ast, is_blink=False): | 514 def __init__(self, func_value_ast, arg_list_ast, is_blink=False): |
| 514 IDLNode.__init__(self, func_value_ast) | 515 IDLNode.__init__(self, func_value_ast) |
| 515 if is_blink: | 516 if is_blink: |
| 516 # Blink path | 517 # Blink path |
| 517 self.id = func_value_ast # func_value_ast is the function name for Blink
. | 518 self.id = func_value_ast # func_value_ast is the function name for Blink
. |
| 518 self.arguments = [] | 519 self.arguments = [] |
| 519 for argument in arg_list_ast: | 520 for argument in arg_list_ast: |
| 520 self.arguments.append(IDLArgument(argument)) | 521 self.arguments.append(IDLArgument(argument)) |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 """IDLDictNode specialization for one annotation.""" | 862 """IDLDictNode specialization for one annotation.""" |
| 862 def __init__(self, ast=None): | 863 def __init__(self, ast=None): |
| 863 IDLDictNode.__init__(self, ast) | 864 IDLDictNode.__init__(self, ast) |
| 864 self.id = None | 865 self.id = None |
| 865 if not ast: | 866 if not ast: |
| 866 return | 867 return |
| 867 for arg in self._find_all(ast, 'AnnotationArg'): | 868 for arg in self._find_all(ast, 'AnnotationArg'): |
| 868 name = self._find_first(arg, 'Id') | 869 name = self._find_first(arg, 'Id') |
| 869 value = self._find_first(arg, 'AnnotationArgValue') | 870 value = self._find_first(arg, 'AnnotationArgValue') |
| 870 self[name] = value | 871 self[name] = value |
| OLD | NEW |