You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One-line formatting gets messed up by unexpected whitespace placement in the syntax tree.
As of now, one-line formatting for certain nodes (e.g. a ReturnClause) is only applied if the
input is also on one line.
E.g.
if ($a) then $b else $c
is left as is, while
if ($a) then $b else
$c
is formatted to
if ($a) then
$b
else
$c
because the input is not on one line.
WS in the AST after certain nodes messes this up, e.g.
for $i in (let, for)
return return
is formatted to
for $i in (let, for)
return
return
because of a '\n' being part of the ReturnClause (it is unclear to me why this WS node is or should be a child of the ReturnClause). Could be fixed by removing WS that have no semantic impact from the end of nodes (and moving it to the parent node).
The text was updated successfully, but these errors were encountered:
One-line formatting gets messed up by unexpected whitespace placement in the syntax tree.
As of now, one-line formatting for certain nodes (e.g. a ReturnClause) is only applied if the
input is also on one line.
E.g.
is left as is, while
is formatted to
because the input is not on one line.
WS in the AST after certain nodes messes this up, e.g.
is formatted to
because of a '\n' being part of the ReturnClause (it is unclear to me why this WS node is or should be a child of the ReturnClause). Could be fixed by removing WS that have no semantic impact from the end of nodes (and moving it to the parent node).
The text was updated successfully, but these errors were encountered: