OLD | NEW |
1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 class IdlInterface(object): | 268 class IdlInterface(object): |
269 def __init__(self, idl_name, node=None): | 269 def __init__(self, idl_name, node=None): |
270 self.attributes = [] | 270 self.attributes = [] |
271 self.constants = [] | 271 self.constants = [] |
272 self.constructors = [] | 272 self.constructors = [] |
273 self.custom_constructors = [] | 273 self.custom_constructors = [] |
274 self.extended_attributes = {} | 274 self.extended_attributes = {} |
275 self.operations = [] | 275 self.operations = [] |
276 self.parent = None | 276 self.parent = None |
277 self.stringifier = None | 277 self.stringifier = None |
| 278 self.original_interface = None |
| 279 self.partial_interfaces = [] |
278 if not node: # Early exit for IdlException.__init__ | 280 if not node: # Early exit for IdlException.__init__ |
279 return | 281 return |
280 | 282 |
281 self.is_callback = node.GetProperty('CALLBACK') or False | 283 self.is_callback = node.GetProperty('CALLBACK') or False |
282 self.is_exception = False | 284 self.is_exception = False |
283 # FIXME: uppercase 'Partial' => 'PARTIAL' in base IDL parser | 285 # FIXME: uppercase 'Partial' => 'PARTIAL' in base IDL parser |
284 self.is_partial = node.GetProperty('Partial') or False | 286 self.is_partial = node.GetProperty('Partial') or False |
285 self.idl_name = idl_name | 287 self.idl_name = idl_name |
286 self.name = node.GetName() | 288 self.name = node.GetName() |
287 self.idl_type = IdlType(self.name) | 289 self.idl_type = IdlType(self.name) |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
819 child_class = child.GetClass() | 821 child_class = child.GetClass() |
820 if child_class != 'Type': | 822 if child_class != 'Type': |
821 raise ValueError('Unrecognized node class: %s' % child_class) | 823 raise ValueError('Unrecognized node class: %s' % child_class) |
822 return type_node_to_type(child) | 824 return type_node_to_type(child) |
823 | 825 |
824 | 826 |
825 def union_type_node_to_idl_union_type(node): | 827 def union_type_node_to_idl_union_type(node): |
826 member_types = [type_node_to_type(member_type_node) | 828 member_types = [type_node_to_type(member_type_node) |
827 for member_type_node in node.GetChildren()] | 829 for member_type_node in node.GetChildren()] |
828 return IdlUnionType(member_types) | 830 return IdlUnionType(member_types) |
OLD | NEW |