1
0
forked from VimPlug/jedi

Move the parsing away from user_context to api.py.

This commit is contained in:
Dave Halter
2016-06-27 08:48:36 +02:00
parent 0445d51d34
commit 969100e471
5 changed files with 20 additions and 25 deletions

View File

@@ -27,15 +27,7 @@ class UserContextParser(object):
@cache.underscore_memoization
def _parser(self):
cache.invalidate_star_import_cache(self._path)
if self._use_fast_parser:
parser = FastParser(self._grammar, self._source, self._path)
# Don't pickle that module, because the main module is changing quickly
cache.save_parser(self._path, parser, pickling=False)
else:
parser = ParserWithRecovery(self._grammar, self._source, self._path)
self._parser_done_callback(parser)
return parser
pass
def module(self):
return self._parser().module