Open vendethiel opened 6 years ago
At the very least, this should go through a deprecation release before the change is made.
Would you also want to change the related ‘surprise’
->
* foo: 0
* bar: 1
# function(){ ({ foo: 0 }); return { bar: 1 }; }
?
I think the proposed grammar would fix this "surprise". But yes it needs to be a test case.
Of note: the ArgList INDENT ArgList DEDENT
rule is mainly for this use case:
[ a
b
c ]
And other similar cases.
Another question is whether
[
* a: 1 b: 2
* c: 3
]
would continue to be a list of objects, or whether you would make it a list of a list of objects.
or whether you would make it a list of a list of objects.
That's a good question. Definitely a breaking change if we pick the latter.
It's still possible, though ugly, to separate the implicit objects in this case:
[
a: 1
b: 2
,
c: 3
]
Seeing how bad that looks, I guess we should pick the former?
Yay #1000!
We really need to fix listar, it's been unintuitive for too long.
should not mean
a = b
.The offending code is here: when we see a
*
not in the middle of an expr, we addvoid =
.The code then parsing it is here, where
Arr.maybe
discards the Array-like structure for a single element.I could see something like (parsing
*
asLISTAR
):with that, we get: