Chromium Code Reviews| 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 | |
|
haraken
2014/10/09 04:24:00
Is "original interface" a term of Web IDL? I'm not
tasak
2014/10/10 07:52:22
I could not find any special term in WebIDL spec.
| |
| 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 | 289 |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 815 child_class = child.GetClass() | 817 child_class = child.GetClass() |
| 816 if child_class != 'Type': | 818 if child_class != 'Type': |
| 817 raise ValueError('Unrecognized node class: %s' % child_class) | 819 raise ValueError('Unrecognized node class: %s' % child_class) |
| 818 return type_node_to_type(child) | 820 return type_node_to_type(child) |
| 819 | 821 |
| 820 | 822 |
| 821 def union_type_node_to_idl_union_type(node): | 823 def union_type_node_to_idl_union_type(node): |
| 822 member_types = [type_node_to_type(member_type_node) | 824 member_types = [type_node_to_type(member_type_node) |
| 823 for member_type_node in node.GetChildren()] | 825 for member_type_node in node.GetChildren()] |
| 824 return IdlUnionType(member_types) | 826 return IdlUnionType(member_types) |
| OLD | NEW |