| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Node classes for the AST for a Mojo IDL file.""" | 5 """Node classes for the AST for a Mojo IDL file.""" |
| 6 | 6 |
| 7 # Note: For convenience of testing, you probably want to define __eq__() methods | 7 # Note: For convenience of testing, you probably want to define __eq__() methods |
| 8 # for all node types; it's okay to be slightly lax (e.g., not compare filename | 8 # for all node types; it's okay to be slightly lax (e.g., not compare filename |
| 9 # and lineno). You may also define __repr__() to help with analyzing test | 9 # and lineno). You may also define __repr__() to help with analyzing test |
| 10 # failures, especially for more complex types. | 10 # failures, especially for more complex types. |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 def __eq__(self, other): | 401 def __eq__(self, other): |
| 402 return super(UnionField, self).__eq__(other) and \ | 402 return super(UnionField, self).__eq__(other) and \ |
| 403 self.attribute_list == other.attribute_list and \ | 403 self.attribute_list == other.attribute_list and \ |
| 404 self.ordinal == other.ordinal and \ | 404 self.ordinal == other.ordinal and \ |
| 405 self.typename == other.typename | 405 self.typename == other.typename |
| 406 | 406 |
| 407 | 407 |
| 408 class UnionBody(NodeListBase): | 408 class UnionBody(NodeListBase): |
| 409 | 409 |
| 410 _list_item_type = UnionField | 410 _list_item_type = UnionField |
| OLD | NEW |