Yuescript icon indicating copy to clipboard operation
Yuescript copied to clipboard

Multiple line return statements

Open 11clock opened this issue 3 years ago • 1 comments

Currently all values that you're returning have to be on a single line, and don't support splitting them across lines like you can do with parameters in functions and function calls. I propose enabling this feature for return statements.

11clock avatar Apr 09 '22 18:04 11clock

You can use backslash to prevent breaking a line for the moment. A syntax for expression list in multiline would currently cause conflict with function arguments in multiline.

-- currently supported syntax
f = ->
  a, b, \
  c, d, \
  e, f

pigpigyyy avatar Apr 18 '22 09:04 pigpigyyy