Commit 72fb6fd6 authored by Sebastien Bourdeauducq's avatar Sebastien Bourdeauducq
Browse files

fhdl/tools/flat_iteration: generalize

parent f53acb92
import collections
from migen.fhdl.structure import *
from migen.fhdl.structure import _Operator, _Slice, _Assign, _ArrayProxy
from migen.fhdl.visit import NodeVisitor, NodeTransformer
def flat_iteration(l):
for element in l:
if isinstance(element, (list, tuple)):
if isinstance(element, collections.Iterable):
for element2 in flat_iteration(element):
yield element2
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment