for comprehension on new line inside collection #8
Labels
area: parser
Related to Abstract Syntax Tree parsing pipeline
language syntax
question
Further information is requested
https://github.com/F1uctus/Axion/blob/a4e33355a629f7ea6c3ebc9428a596b23f94355b/Axion.Core/Processing/Syntactic/Expression.cs#L424-L429
There is a check, that
for
keyword is not placed at new line, to resolve that code:Axion:
not to be parsed as
for comprehension
(<expression> for x in y
).But also,
for
is allowed to be placed in that context:and, because of
newline
check, we must write it like:so,
for
allowed to be placed on new line if it's invoked by function, that parsescollection expression embraced in
()
,{}
or[]
.The text was updated successfully, but these errors were encountered: