Some bugs creating token stream ..

from instructions.
This commit is contained in:
rocky
2022-04-25 16:39:53 -04:00
parent bf58fb9cf2
commit 4879a60ecc
2 changed files with 29 additions and 37 deletions

View File

@@ -721,8 +721,8 @@ class NonterminalActions:
def n_import_from(self, node):
relative_path_index = 0
if self.version >= (2, 5):
if node[relative_path_index].pattr > 0:
node[2].pattr = ("." * node[relative_path_index].pattr) + node[2].pattr
if node[relative_path_index].attr > 0:
node[2].pattr = ("." * node[relative_path_index].attr) + node[2].pattr
if self.version > (2, 7):
if isinstance(node[1].pattr, tuple):
imports = node[1].pattr