Dave Leeds
06/08/2018, 1:55 AMatomicExpression
includes a number of things that can be evaluated, like literalConstant
and functionLiteral
. Even the different jump
structures (like throw
and return
) appear to technically evaluate to Nothing
.
But the list also includes loop
, which doesn't appear to be an expression. In fact, if you try to assign a for
loop to a variable, the compiler says that "For is not an expression, and only expressions are allowed here."
So, I was wondering, why does loop
show up as part of atomicExpression
in the grammar? Is there some context in which loops can be evaluated?udalov
Dave Leeds
06/13/2018, 4:29 PM