LiveScript is a language which compiles to JavaScript. It has a straightforward mapping to JavaScript and allows you to write expressive code devoid of repetitive boilerplate. While LiveScript adds many features to assist in functional style programming, it also has many improvements for object oriented and imperative programming.
Most of the time, the precedence difference between && and ||
doesn't need to be attended, because it's the same in LiveScript and
JavaScript. But when synthetic && nodes are created, it's important to
ensure that the children of the node either must have had higher
precedence when parsed, are also synthetic and represent expressions
with higher precedence, or are wrapped in Parens. The reported bug,
and a similar issue with the binary ? operator, are the consequences
if not.
As a simple bug fix, I will hold this PR open for one week, merging on or after Apr 27 if there are no comments, unless @gkz gets to it first again! :grin:
Most of the time, the precedence difference between
&&
and||
doesn't need to be attended, because it's the same in LiveScript and JavaScript. But when synthetic&&
nodes are created, it's important to ensure that the children of the node either must have had higher precedence when parsed, are also synthetic and represent expressions with higher precedence, or are wrapped inParens
. The reported bug, and a similar issue with the binary?
operator, are the consequences if not.As a simple bug fix, I will hold this PR open for one week, merging on or after Apr 27 if there are no comments, unless @gkz gets to it first again! :grin: