Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kestrel Collaboration
Kestrel LiteX
migen
Commits
2bc17135
Commit
2bc17135
authored
4 years ago
by
Sebastien Bourdeauducq
Browse files
Options
Download
Email Patches
Plain Diff
fix incorrect use of is/==. Closes #199
parent
bee558c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
migen/fhdl/visit.py
migen/fhdl/visit.py
+2
-2
No files found.
migen/fhdl/visit.py
View file @
2bc17135
...
...
@@ -83,7 +83,7 @@ class NodeVisitor:
def
visit_Case
(
self
,
node
):
self
.
visit
(
node
.
test
)
for
v
,
statements
in
sorted
(
node
.
cases
.
items
(),
key
=
lambda
x
:
-
1
if
x
[
0
]
is
"default"
else
x
[
0
].
duid
):
key
=
lambda
x
:
-
1
if
x
[
0
]
==
"default"
else
x
[
0
].
duid
):
self
.
visit
(
statements
)
def
visit_Fragment
(
self
,
node
):
...
...
@@ -188,7 +188,7 @@ class NodeTransformer:
def
visit_Case
(
self
,
node
):
cases
=
{
v
:
self
.
visit
(
statements
)
for
v
,
statements
in
sorted
(
node
.
cases
.
items
(),
key
=
lambda
x
:
-
1
if
x
[
0
]
is
"default"
else
x
[
0
].
duid
)}
key
=
lambda
x
:
-
1
if
x
[
0
]
==
"default"
else
x
[
0
].
duid
)}
r
=
Case
(
self
.
visit
(
node
.
test
),
cases
)
return
r
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment