1
0
forked from VimPlug/jedi

parsing.PyFuzzyParser -> Parser

This commit is contained in:
David Halter
2013-02-04 16:18:24 +01:00
parent e1ab3855fa
commit 95c5b9a5e3
6 changed files with 10 additions and 11 deletions

View File

@@ -138,10 +138,10 @@ class CachedFastParser(type):
""" This is a metaclass for caching `FastParser`. """
def __call__(self, source, module_path=None, user_position=None):
if not settings.fast_parser:
return parsing.PyFuzzyParser(source, module_path, user_position)
return parsing.Parser(source, module_path, user_position)
pi = cache.parser_cache.get(module_path, None)
if pi is None or isinstance(pi.parser, parsing.PyFuzzyParser):
if pi is None or isinstance(pi.parser, parsing.Parser):
p = super(CachedFastParser, self).__call__(source, module_path,
user_position)
else:
@@ -248,7 +248,7 @@ class FastParser(use_metaclass(CachedFastParser)):
p.user_scope = self.scan_user_scope(m) \
or self.module
else:
p = parsing.PyFuzzyParser(code[start:],
p = parsing.Parser(code[start:],
self.module_path, self.user_position,
line_offset=line_offset, stop_on_scope=True,
top_module=self.module)