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
I've came across with this case numerous times. Consider the following example:
hello foo, bar
hi there
Compiled output is obviously:
hello(foo,bar);hi(there);
Then I remove the bar parameter, but accidentally forgot to remove the comma. The compiled output becomes:
hello(foo,hi(there));
instead of:
hello(foo);hi(there);
Proposal
I guess this is not a bug, but a feature. However, I think LiveScript will be more error resistant if this feature is removed and users are forced to use backslash or parenthesis for multi line splitting purposes.
At least, an indentation for further lines must be required for considering a line to be split. to consider the line split.
The text was updated successfully, but these errors were encountered:
is okay, however the following - which is my vote - will throw syntax error:
callFunc param,
anotherParam,
someFlag
Second one is also confusing to human eye anyway.
ceremcem
changed the title
Throw exception on a function call line that ends with comma
Throw syntax error on a function call line which ends with a comma and further line(s) without indentation
Jul 20, 2020
I've came across with this case numerous times. Consider the following example:
Compiled output is obviously:
Then I remove the
bar
parameter, but accidentally forgot to remove the comma. The compiled output becomes:instead of:
Proposal
I guess this is not a bug, but a feature. However, I think LiveScript will be more error resistant if this feature is removed and users are forced to use
backslash or parenthesis for multi line splitting purposes.At least,an indentation for further linesmust be required for considering a line to be split.to consider the line split.The text was updated successfully, but these errors were encountered: