[Libre-soc-bugs] [Bug 1094] insndb instruction database visitor-walker is needed

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Jun 20 20:28:26 BST 2023


https://bugs.libre-soc.org/show_bug.cgi?id=1094

--- Comment #213 from Dmitry Selyutin <ghostmansd at gmail.com> ---
That's what I mean:

nodes = (
    {("a", 1): 3.4, 2: {5, 6}},
    {3: A(5, [12, 3])},
)
for (node, parent, pathid, path) in walker(nodes):
    print(parent, pathid(path), "=>", node)


({('a', 1): 3.4, 2: {5, 6}}, {3: A(a=5, b=[12, 3])}) [0] => {('a', 1): 3.4, 2:
{5, 6}}
{('a', 1): 3.4, 2: {5, 6}} {('a', 1)} => ('a', 1)
('a', 1) [0] => a
('a', 1) [1] => 1
{('a', 1): 3.4, 2: {5, 6}} [('a', 1)] => 3.4
{('a', 1): 3.4, 2: {5, 6}} {2} => 2
{('a', 1): 3.4, 2: {5, 6}} [2] => {5, 6}
{5, 6} {5} => 5
{5, 6} {6} => 6
({('a', 1): 3.4, 2: {5, 6}}, {3: A(a=5, b=[12, 3])}) [1] => {3: A(a=5, b=[12,
3])}
{3: A(a=5, b=[12, 3])} {3} => 3
{3: A(a=5, b=[12, 3])} [3] => A(a=5, b=[12, 3])
A(a=5, b=[12, 3]) .a => 5
A(a=5, b=[12, 3]) .b => [12, 3]
[12, 3] [0] => 12
[12, 3] [1] =>

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list