1
0
forked from VimPlug/jedi

update parser settings

This commit is contained in:
David Halter
2012-12-18 01:09:21 +01:00
parent 92feb2f1d6
commit 2a8660b989
2 changed files with 12 additions and 3 deletions

View File

@@ -1,8 +1,9 @@
import re
import operator
import parsing
from _compatibility import use_metaclass, reduce, property
import settings
import parsing
parser_cache = {}
@@ -211,7 +212,9 @@ class FastParser(use_metaclass(CachedFastParser)):
parts[0] += parts[1]
parts.pop(1)
#self.parsers[:] = []
if settings.fast_parser_always_reparse:
self.parsers[:] = []
# dict comprehensions are not available in py2.5/2.6 :-(
hashes = dict((p.hash, p) for p in self.parsers)

View File

@@ -18,9 +18,15 @@ add_bracket_after_function = False
# parser
# ----------------
# Use the fast parser, may cause problems sometimes.
# Use the fast parser. This means that reparsing is only being done if
# something has been changed e.g. to a function. If this happens, only the
# function is being reparsed.
fast_parser = True
# This is just a debugging option. Always reparsing means that the fast parser
# is basically useless. So don't use it.
fast_parser_always_reparse = False
# ----------------
# dynamic stuff
# ----------------