parent
9d62cbefa5
commit
df70aae887
2 changed files with 9 additions and 1 deletions
|
|
@ -337,7 +337,10 @@ class _StatementCompiler(StatementVisitor, _Compiler):
|
|||
self.emitter.append("pass")
|
||||
|
||||
def on_Assign(self, stmt):
|
||||
return self.lhs(stmt.lhs)(self.rhs(stmt.rhs))
|
||||
gen_rhs = f"({(1 << len(stmt.rhs)) - 1} & {self.rhs(stmt.rhs)})"
|
||||
if stmt.rhs.shape().signed:
|
||||
gen_rhs = f"sign({gen_rhs}, {-1 << (len(stmt.rhs) - 1)})"
|
||||
return self.lhs(stmt.lhs)(gen_rhs)
|
||||
|
||||
def on_Switch(self, stmt):
|
||||
gen_test = self.emitter.def_var("test",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue