forked from VimPlug/jedi
Fix issues with octals in Python 2 (and possibly 3). Fixes #559.
This commit is contained in:
@@ -52,7 +52,10 @@ name = r'\w+'
|
||||
|
||||
hex_number = r'0[xX][0-9a-fA-F]+'
|
||||
bin_number = r'0[bB][01]+'
|
||||
oct_number = r'0[oO][0-7]+'
|
||||
if is_py3:
|
||||
oct_number = r'0[oO][0-7]+'
|
||||
else:
|
||||
oct_number = '0[0-7]+'
|
||||
dec_number = r'(?:0+|[1-9][0-9]*)'
|
||||
int_number = group(hex_number, bin_number, oct_number, dec_number)
|
||||
exponent = r'[eE][-+]?[0-9]+'
|
||||
|
||||
@@ -664,6 +664,9 @@ class ErrorNode(BaseNode):
|
||||
__slots__ = ()
|
||||
type = 'error_node'
|
||||
|
||||
def nodes_to_execute(self, last_added=False):
|
||||
return []
|
||||
|
||||
|
||||
class ErrorLeaf(LeafWithNewLines):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user