3.7+ bug in handling extended arg

This commit is contained in:
rocky
2020-01-22 14:31:45 -05:00
parent dcf7ca1061
commit 018583069b
4 changed files with 45 additions and 58 deletions

View File

@@ -55,7 +55,6 @@ class Token:
else:
self.offset = offset
self.offset = offset
self.linestart = linestart
if has_arg is False:
self.attr = None
@@ -165,7 +164,7 @@ class Token:
def __getitem__(self, i):
raise IndexError
def off2int(self):
def off2int(self, prefer_last=True):
if isinstance(self.offset, int):
return self.offset
else: