| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 """Templating to help generate structured text.""" | 6 """Templating to help generate structured text.""" |
| 7 | 7 |
| 8 import logging | 8 import logging |
| 9 import re | 9 import re |
| 10 | 10 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 def Lookup(self, name, default): | 209 def Lookup(self, name, default): |
| 210 if name in self._map: | 210 if name in self._map: |
| 211 return self._map[name] | 211 return self._map[name] |
| 212 if self._parent: | 212 if self._parent: |
| 213 return self._parent.Lookup(name, default) | 213 return self._parent.Lookup(name, default) |
| 214 return default | 214 return default |
| 215 | 215 |
| 216 def Extend(self, map): | 216 def Extend(self, map): |
| 217 return Emitter.Frame(map, self) | 217 return Emitter.Frame(map, self) |
| OLD | NEW |