(self, context_code="")
| 277 | _context_cache = dict() |
| 278 | |
| 279 | def __init__(self, context_code=""): |
| 280 | self._parser_cache = dict() |
| 281 | context_ast = getattr(self._context_cache, context_code, None) |
| 282 | if context_ast is None: |
| 283 | context_ast = self._context_cache[context_code] = self.parse(context_code)[ |
| 284 | 1 |
| 285 | ] |
| 286 | self.context_mappings = self._getx(FunctionParser, "mappings", context_ast) |
| 287 | |
| 288 | def find(self, name, node, *args, **kwargs): |
| 289 | return getattr(self, name)(node) |