| 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 """Translates parse tree to Mojom IR.""" | 5 """Translates parse tree to Mojom IR.""" |
| 6 | 6 |
| 7 import re | 7 import re |
| 8 | 8 |
| 9 from . import ast | 9 from . import ast |
| 10 | 10 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 self.mojom['constants'] = \ | 213 self.mojom['constants'] = \ |
| 214 _MapTreeForType(_ConstToDict, tree.definition_list, ast.Const, name) | 214 _MapTreeForType(_ConstToDict, tree.definition_list, ast.Const, name) |
| 215 _AddOptional(self.mojom, 'attributes', | 215 _AddOptional(self.mojom, 'attributes', |
| 216 _AttributeListToDict(tree.module.attribute_list) | 216 _AttributeListToDict(tree.module.attribute_list) |
| 217 if tree.module else None) | 217 if tree.module else None) |
| 218 return self.mojom | 218 return self.mojom |
| 219 | 219 |
| 220 | 220 |
| 221 def Translate(tree, name): | 221 def Translate(tree, name): |
| 222 return _MojomBuilder().Build(tree, name) | 222 return _MojomBuilder().Build(tree, name) |
| OLD | NEW |