KeKsBoTer / setlx2python

setlX to Python transpiler
2 stars 0 forks source link

correct setlx condition handling in python #6

Closed KeKsBoTer closed 5 years ago

KeKsBoTer commented 5 years ago

SetlX and Python handle conditions differently. While setlX conditions always return true or false, python conditions can return everything. In python None or 2 returns two while the setlx equivilant om || 2 returns an error, because om and 2 are not of type boolean.

KeKsBoTer commented 5 years ago

maybe pack every statement into to_bool(expr) function and throw error if expr is not of type boolean.