back.pysim: fix scope screwup.
This commit is contained in:
parent
2f7e52369c
commit
6f4e3156d8
|
@ -329,7 +329,9 @@ class _StatementCompiler(StatementVisitor):
|
||||||
mask = "1" * len(value)
|
mask = "1" * len(value)
|
||||||
mask = int(mask, 2)
|
mask = int(mask, 2)
|
||||||
value = int(value, 2)
|
value = int(value, 2)
|
||||||
check = lambda test: test & mask == value
|
def make_check(mask, value):
|
||||||
|
return lambda test: test & mask == value
|
||||||
|
check = make_check(mask, value)
|
||||||
cases.append((check, self.on_statements(stmts)))
|
cases.append((check, self.on_statements(stmts)))
|
||||||
def run(state):
|
def run(state):
|
||||||
test_value = test(state)
|
test_value = test(state)
|
||||||
|
|
Loading…
Reference in a new issue