| 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 """Utility functions (file reading, simple IDL parsing by regexes) for IDL build
. | 5 """Utility functions (file reading, simple IDL parsing by regexes) for IDL build
. |
| 6 | 6 |
| 7 Design doc: http://www.chromium.org/developers/design-documents/idl-build | 7 Design doc: http://www.chromium.org/developers/design-documents/idl-build |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 import os | 10 import os |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 179 |
| 180 def get_put_forward_interfaces_from_idl(file_contents): | 180 def get_put_forward_interfaces_from_idl(file_contents): |
| 181 put_forwards_pattern = (r'\[[^\]]*PutForwards=[^\]]*\]\s+' | 181 put_forwards_pattern = (r'\[[^\]]*PutForwards=[^\]]*\]\s+' |
| 182 r'readonly\s+' | 182 r'readonly\s+' |
| 183 r'attribute\s+' | 183 r'attribute\s+' |
| 184 r'(\w+)') | 184 r'(\w+)') |
| 185 return sorted(set(match.group(1) | 185 return sorted(set(match.group(1) |
| 186 for match in re.finditer(put_forwards_pattern, | 186 for match in re.finditer(put_forwards_pattern, |
| 187 file_contents, | 187 file_contents, |
| 188 flags=re.DOTALL))) | 188 flags=re.DOTALL))) |
| OLD | NEW |