Expressions which contain indentation are currently let/in, case/of and do blocks (probably expanding).
It's a reoccurring issue with our horrendous indentation system #15 which we should probably replace.
I am actually not sure if they should parse (we don't have a specification yet). But those three examples below
should parse but don't:
Let/in:
alpha: Alpha = let alpha = alpha in
alpha
Diagnostic:
error[E010]: found indentation, but expected expression
> test.lushui:6:1
|
6 | x
| ^^^^
Case/of (error does not happen if there is no declaration below the one containing the case analysis):
alpha: Alpha = case alpha of
alpha => alpha
beta
Diagnostic:
error[E010]: found identifier, but expected line break
> test.lushui:11:1
|
11 | beta
| ^^^^
Do blocks (error does not happen if there is no declaration below the one containing the case analysis):
alpha: Alpha = do
alpha <- alpha
beta
Diagnostic:
error[E010]: found identifier, but expected line break
> test.lushui:8:1
|
8 | beta
| ^^^^
Each of them can be slightly rewritten that is indented to make them parse:
Expressions which contain indentation are currently let/in, case/of and do blocks (probably expanding). It's a reoccurring issue with our horrendous indentation system #15 which we should probably replace.
I am actually not sure if they should parse (we don't have a specification yet). But those three examples below should parse but don't:
Let/in:
Diagnostic:
Case/of (error does not happen if there is no declaration below the one containing the case analysis):
Diagnostic:
Do blocks (error does not happen if there is no declaration below the one containing the case analysis):
Diagnostic:
Each of them can be slightly rewritten that is indented to make them parse: