mirror of
https://github.com/myhdl/myhdl.git
synced 2024-12-14 07:44:38 +08:00
3.9 serves a tuple
This commit is contained in:
parent
55e823e939
commit
48f7a5897c
@ -969,7 +969,7 @@ class _AnalyzeVisitor(ast.NodeVisitor, _ConversionMixin):
|
||||
self.generic_visit(node)
|
||||
|
||||
def visit_Subscript(self, node):
|
||||
print(node.slice)
|
||||
print('Analyze', node.slice)
|
||||
if isinstance(node.slice, ast.Slice):
|
||||
self.accessSlice(node)
|
||||
else:
|
||||
|
@ -1132,11 +1132,12 @@ class _ConvertVisitor(ast.NodeVisitor, _ConversionMixin):
|
||||
s = "1'b%s" % int(obj)
|
||||
elif isinstance(obj, int):
|
||||
s = self.IntRepr(obj)
|
||||
# elif isinstance(obj, tuple): # Python3.9+ ast.Index serves a tuple
|
||||
# print(obj)
|
||||
elif isinstance(obj, tuple): # Python3.9+ ast.Index serves a tuple
|
||||
print(obj)
|
||||
s = n
|
||||
# # print(ast.dump(ast.parse('l[i]', mode='eval')))
|
||||
# # Expression(body=Subscript(value=Name(id='l', ctx=Load()), slice=Index(value=Name(id='i', ctx=Load())), ctx=Load()))
|
||||
# s = str(obj[0])
|
||||
|
||||
elif isinstance(obj, _Signal):
|
||||
addSignBit = isMixedExpr
|
||||
s = str(obj)
|
||||
|
Loading…
x
Reference in New Issue
Block a user