timothycrosley / jiphy

Your client side done in a jiphy. Python to JavaScript 2-way converter.
MIT License
585 stars 73 forks source link

Bad conversion py->js: "sensor" -> "sens||" #22

Open gorelick opened 7 years ago

gorelick commented 7 years ago

Converting from python to javascript, the two letter phrase "or" is converted to "||" any time it is followed by whitespace (same for "and" / "&&")

cmd = operand + operator + args becomes cmd = oper&& + operat|| + args;

gorelick commented 7 years ago

Same for "def", "not", "del".

model = undef + 1 axis = knot + 2

becomes

modelete = unfunction + 1; axis = k!+ 2;