mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-25 20:17:22 +08:00
get the 'not' priorities right for precedences
This commit is contained in:
1 parent
3559dba7ea
commit
11346d0901
2 files changed
+3
-2
No files matched your search
@@ -86,7 +86,8 @@ def _get_number(iterator, priority=PythonGrammar.LOWEST_PRIORITY):
|
||||
if isinstance(el, pr.Operator):
|
||||
if el in PythonGrammar.FACTOR:
|
||||
right = _get_number(iterator, PythonGrammar.FACTOR_PRIORITY)
|
||||
elif el in PythonGrammar.NOT_TEST and priority <= PythonGrammar.FACTOR_PRIORITY:
|
||||
elif el in PythonGrammar.NOT_TEST \
|
||||
and priority >= PythonGrammar.NOT_TEST_PRIORITY:
|
||||
right = _get_number(iterator, PythonGrammar.NOT_TEST_PRIORITY)
|
||||
else:
|
||||
_syntax_error(el)
|
||||
|
||||
Reference in new issue
Block a user