I wonder if it would work (and be unambiguous) to allow an indented condition to use (further) indented function calls:
// if/then/else
if
(and)
x
y
console.log 'yes'
else
console.log 'no'
// postfix unless
return unless
(and)
x
y
It does seem to work quite well! I think this is a natural extension of various settings where we allow indented expressions (e.g. after return or yield). It looks a little weird when you don't have an indented application, but the expression still has a clear "end" (from the line break):
if
a + b < 10
console.log 'small'
I'd like to propose that this fixes #1090, but that is perhaps subject to debate.
This PR explores the proposal from https://github.com/DanielXMoore/Civet/issues/1090#issuecomment-2291837213 :
It does seem to work quite well! I think this is a natural extension of various settings where we allow indented expressions (e.g. after
return
oryield
). It looks a little weird when you don't have an indented application, but the expression still has a clear "end" (from the line break):I'd like to propose that this fixes #1090, but that is perhaps subject to debate.